/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Brand Colors */
:root {
    /* Johnson brand colors */
    --johnson-primary: #204177;
    --johnson-secondary: #2B589C;

    /* Royal Pro brand colors */
    --royal-pro-primary: #921A14;
    --royal-pro-secondary: #B02419;

    /* Scoch Guard brand colors */
    --scoch-guard-primary: #E72326;
    --scoch-guard-secondary: #FF4044;

    /* Ultimate brand colors */
    --ultimate-primary: #000000;
    --ultimate-secondary: #424242;

    /* Common colors */
    --white: #FFFFFF;
    --black: #000000;
    --grey: #9E9E9E;
    --light-grey: #F5F5F5;
    --error: #E57373;
    --success: #81C784;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-strong: rgba(0, 0, 0, 0.26);
}

/* Screen Management */
.screen {
    min-height: 100vh;
    width: 100%;
    position: relative;
}

.hidden {
    display: none !important;
}

/* Container and Layout */
.container {
    width: 100%;
    height: 100vh;
    position: relative;
}

/* Default gradient (Johnson) */
.container {
    background: linear-gradient(to bottom, var(--johnson-primary), var(--johnson-secondary));
}

/* Brand-specific gradients */
.container.royal-pro {
    background: linear-gradient(to bottom, var(--royal-pro-primary), var(--royal-pro-secondary));
}

.container.scoch-guard {
    background: linear-gradient(to bottom, var(--scoch-guard-primary), var(--scoch-guard-secondary));
}

.container.ultimate {
    background: linear-gradient(to bottom, var(--ultimate-primary), var(--ultimate-secondary));
}

.content-wrapper {
    position: relative;
    z-index: 1;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 60px;
    color: var(--white);
}

.icon-container {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 20px;
    display: inline-block;
    margin-bottom: 30px;
}

.icon-container i {
    font-size: 60px;
    color: var(--white);
}

.header h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
}

.header p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto;
}

/* Brand strip */
.brand-strip {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 18px 0 8px;
}

.brand-strip-logo {
    height: 34px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.brand-strip-logo:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* Form Container */
.form-container {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 20px var(--shadow);
    width: 100%;
    max-width: 500px;
}

.form-container h2 {
    text-align: center;
    color: var(--johnson-primary);
    font-weight: bold;
    margin-bottom: 30px;
    font-size: 24px;
}

/* Input Styles */
.input-group {
    margin-bottom: 30px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 20px;
    color: var(--johnson-primary);
    font-size: 18px;
    z-index: 2;
}

.input-container input {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border: 1px solid var(--grey);
    border-radius: 15px;
    font-size: 16px;
    background: rgba(245, 245, 245, 0.3);
    transition: all 0.3s ease;
}

.input-container input:focus {
    outline: none;
    border: 2px solid var(--johnson-primary);
    background: var(--white);
}

.input-container input::placeholder {
    color: var(--grey);
}

.error-message {
    color: var(--error);
    font-size: 14px;
    margin-top: 8px;
    min-height: 20px;
}

/* Button Styles */
.submit-btn {
    width: 100%;
    height: 56px;
    background: var(--johnson-primary);
    color: var(--white);
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px var(--shadow-strong);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-strong);
}

.submit-btn:disabled {
    background: var(--grey);
    cursor: not-allowed;
    transform: none;
}

.back-btn {
    width: 100%;
    height: 56px;
    background: var(--white);
    color: var(--black);
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px var(--shadow);
    margin-top: 30px;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: var(--white);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    font-size: 16px;
    font-weight: 500;
}

/* Results Screen */
.results-header {
    text-align: center;
    margin-bottom: 50px;
    color: var(--white);
}

.brand-logo-container {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 20px;
    display: inline-block;
    margin-bottom: 20px;
}

.brand-logo {
    height: 80px;
    width: 80px;
    object-fit: contain;
}

.results-header h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.results-header p {
    font-size: 18px;
    opacity: 0.9;
}

/* Warranty Details Card */
.warranty-details-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 20px var(--shadow);
    width: 100%;
    max-width: 800px;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 25px;
}

.status-badge.active {
    background: var(--success);
    color: var(--white);
}

.status-badge.notactive {
    background: var(--error);
    color: var(--white);
}

.status-badge.expired {
    background: var(--grey);
    color: var(--white);
}

/* Info Sections */
.info-section {
    margin-bottom: 25px;
}

.info-section h3 {
    font-size: 18px;
    font-weight: bold;
    color: var(--johnson-primary);
    margin-bottom: 15px;
}

.info-container {
    background: rgba(245, 245, 245, 0.3);
    border: 1px solid rgba(32, 65, 119, 0.2);
    border-radius: 15px;
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    gap: 16px;
}

.info-label {
    flex: 2;
    font-weight: 500;
    color: var(--grey);
    font-size: 14px;
}

.info-value {
    flex: 3;
    font-weight: 600;
    color: var(--black);
    font-size: 14px;
    text-align: right;
    word-break: break-word;
}

/* Brand-specific section headers */
.container.royal-pro .info-section h3,
.container.royal-pro .form-container h2 {
    color: var(--royal-pro-primary);
}

.container.scoch-guard .info-section h3,
.container.scoch-guard .form-container h2 {
    color: var(--scoch-guard-primary);
}

.container.ultimate .info-section h3,
.container.ultimate .form-container h2 {
    color: var(--ultimate-primary);
}

.container.royal-pro .info-container {
    border-color: rgba(146, 26, 20, 0.2);
}

.container.scoch-guard .info-container {
    border-color: rgba(231, 35, 38, 0.2);
}

.container.ultimate .info-container {
    border-color: rgba(0, 0, 0, 0.2);
}

/* Error Toast */
.error-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--error);
    color: var(--white);
    padding: 16px 24px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 5px 15px var(--shadow);
    z-index: 1001;
    font-weight: 500;
    max-width: 90%;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */

/* Mobile styles (default) */
@media (max-width: 767px) {
    .content-wrapper {
        padding: 16px 14px 24px;
    }

    .header {
        margin-bottom: 40px;
    }

    .header h1 {
        font-size: 28px;
    }

    .form-container {
        margin-bottom: 24px;
    }

    .warranty-details-card {
        margin-bottom: 24px;
    }

    .info-row {
        flex-direction: column;
        gap: 6px;
    }

    .info-value {
        text-align: left;
        font-size: 15px;
    }

    .brand-strip {
        gap: 10px;
        margin: 12px 0 4px;
    }

    .brand-strip-logo {
        height: 28px;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .content-wrapper {
        padding: 40px;
    }

    .form-container {
        max-width: 600px;
    }

    .warranty-details-card {
        max-width: 700px;
    }

    .header {
        margin-bottom: 80px;
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    .content-wrapper {
        padding: 40px 40px 60px;
    }

    .form-container {
        max-width: 500px;
    }

    .warranty-details-card {
        max-width: 800px;
    }

    .header {
        margin-bottom: 100px;
    }

    .results-header {
        margin-bottom: 50px;
    }
}

/* Print styles */
@media print {

    .loading-overlay,
    .error-toast,
    .back-btn {
        display: none !important;
    }

    .container {
        background: white !important;
        color: black !important;
        height: auto !important;
    }

    .results-header,
    .header {
        color: black !important;
    }
}

/* ========================= */
/* Modern UI Enhancements    */
/* ========================= */

/* Brand-aware variables on containers */
.container {
    --brand-primary: var(--johnson-primary);
    --brand-secondary: var(--johnson-secondary);
    position: relative;
    overflow: hidden;
}

.container.royal-pro {
    --brand-primary: var(--royal-pro-primary);
    --brand-secondary: var(--royal-pro-secondary);
}

.container.scoch-guard {
    --brand-primary: var(--scoch-guard-primary);
    --brand-secondary: var(--scoch-guard-secondary);
}

.container.ultimate {
    --brand-primary: var(--ultimate-primary);
    --brand-secondary: var(--ultimate-secondary);
}

/* Animated ambient glow overlay */
.container::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background:
        radial-gradient(40% 40% at 20% 20%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 60%),
        radial-gradient(35% 35% at 80% 30%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 60%),
        radial-gradient(45% 45% at 50% 80%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 60%);
    filter: blur(10px);
    animation: floatGlow 14s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes floatGlow {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }

    100% {
        transform: translate3d(2%, -2%, 0) rotate(2deg);
    }
}

/* Raise content above overlays */
.content-wrapper {
    z-index: 1;
}

/* Glass effect cards */
.form-container,
.warranty-details-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

/* Section containers inside cards with softer fills */
.info-container {
    background: rgba(0, 0, 0, 0.035);
    border-color: rgba(0, 0, 0, 0.08);
}

/* Brand-colored headings and accents */
.form-container h2,
.info-section h3 {
    color: var(--brand-primary);
}

.input-icon {
    color: var(--brand-primary);
}

.input-container input:focus {
    border: 2px solid var(--brand-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(32, 65, 119, 0.15), 0 8px 20px var(--shadow-strong);
}

/* Modern buttons with brand gradient */
.submit-btn {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    transform: translateY(0) scale(1);
}

.submit-btn:hover {
    transform: translateY(-2px) scale(1.01);
    filter: brightness(1.05);
}

.submit-btn:active {
    transform: translateY(0) scale(0.99);
}

.back-btn {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Icon and logo containers with lighter glass */
.icon-container,
.brand-logo-container {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.brand-logo {
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
}

/* Status badges with subtle glow */
.status-badge {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.status-badge.active {
    background: #2e7d32;
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(46, 125, 50, 0.45);
}

.status-badge.notactive {
    background: #c62828;
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(198, 40, 40, 0.45);
}

.status-badge.expired {
    background: #616161;
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(97, 97, 97, 0.45);
}

/* Typography refinements */
.header h1 {
    letter-spacing: 0.3px;
}

.results-header h1 {
    letter-spacing: 0.2px;
}

.info-label {
    opacity: 0.9;
}

.info-value {
    opacity: 0.95;
}

/* Improve spacing rhythm */
.form-container {
    padding: 32px;
}

.warranty-details-card {
    padding: 34px;
}

.info-row {
    padding: 10px 0;
}

/* Reduce harsh scroll bounce on iOS glass backgrounds */
@supports (-webkit-overflow-scrolling: touch) {

    .form-container,
    .warranty-details-card {
        -webkit-backdrop-filter: blur(12px);
    }
}

/* Print overrides for glass to ensure readability */
@media print {

    .form-container,
    .warranty-details-card,
    .icon-container,
    .brand-logo-container {
        background: #ffffff !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    .submit-btn,
    .back-btn {
        box-shadow: none !important;
    }
}

/* High-contrast logo container in results header */
.results-header .brand-logo-container {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

/* Ultimate brand uses white logo → use black card behind */
.container.ultimate .results-header .brand-logo-container {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}