/* 
 * PROJECT: Sherlock's Life Onboarding Portal
 * FILE: style.css
 * DESCRIPTION: Main stylesheet for the onboarding system
 */

/* --- PROFESSIONAL IT THEME --- */
* {
    box-sizing: border-box;
}

:root {
    /* Professional Corporate Palette */
    --primary-color: #1a73e8;
    /* Trusted Tech Blue */
    --primary-hover: #1765cc;
    --secondary-color: #f8f9fa;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --success-color: #1e8e3e;
    --error-color: #d93025;
    --form-bg: #ffffff;
    --border-color: #dadce0;
    --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    /* Standard Card Shadow */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --border-radius: 4px;
    /* More precise, less rounded */
}

/* Modern Timer Display */
.timer-display {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    margin-top: 2rem;
    margin-bottom: 2rem;
    z-index: 10;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    animation: simpleFadeIn 0.5s ease-out;
}

/* Video Timeline (Progress Bar) */
.video-progress-container {
    width: 100%;
    height: 4px;
    /* Thin line */
    background: rgba(255, 255, 255, 0.2);
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 5;
}

.video-progress-fill {
    height: 100%;
    background: var(--primary-color);
    /* Matches theme */
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(0, 86, 179, 0.8);
}

/* Modern Background Effect */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f1f3f4;
    /* Subtle corporate gray */
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 120px 0 0 0;
    /* Space for absolute header */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* LAYOUT UTILITIES */
/* LAYOUT OPTIMIZATION - COMPACT & PROFESSIONAL */
.main-container {
    width: 100%;
    max-width: 1400px;
    /* Wider for more screen coverage */
    margin: 0;
    padding: 1.5rem 5%;
    /* Left-aligned with 5% gutter */
    flex: 1;
}

/* A) HEADER - MINIMALIST (Logo Only) */
/* A) HEADER - MINIMALIST (Logo Only) */
.header {
    background-color: transparent;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: none;
    padding: 10px 20px;
    /* Tighter corner positioning */
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: auto;
}

.phase-indicator {
    display: none;
}

.logo {
    display: flex;
    align-items: center;
}

/* Maximize Logo Visibility - USER REQUESTED "BADA" */
.logo img {
    height: 100px;
    /* Scaled back from 160px for a more professional balance */
    width: auto;
    object-fit: contain;
    display: block;
    max-width: 400px;
}

.phase-indicator {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* B) VIDEO CONTAINER - MODAL OVERLAY MODE */
.video-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    padding: 2rem 5%;
    background: transparent;
    width: 100%;
    z-index: 1000;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover/Modal Mode when Briefing Starts */
.video-section.is-briefing {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    /* SEMI-TRANSPARENT BACKDROP */
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 9999;
}

.video-section.is-briefing .video-heading-container {
    margin-bottom: 2rem;
}

.video-section.is-briefing .video-title {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.video-section.is-briefing .video-subtitle {
    color: #ddd;
}

.video-heading-container {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: simpleFadeIn 1s ease-out;
}

.video-title {
    font-size: 2rem;
    /* Slightly smaller for normal look */
    font-weight: 800;
    margin-bottom: 0.2rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.video-subtitle {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
}

.video-wrapper {
    width: 100%;
    max-width: 900px;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    /* REVERTED TO CENTER */
    overflow: hidden;
    position: relative;
    height: auto;
    max-height: 80vh;
    /* Prevent vertical videos from becoming too tall */
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-content {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    /* Respect native frame/aspect ratio */
    display: block;
}

/* Professional Start Button (No Emoji) */
.start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Lighter overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    cursor: pointer;
    transition: background 0.3s;
    backdrop-filter: blur(2px);
}

.start-overlay:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Large styled play button */
.play-button-styled {
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90%;
    margin: 0 auto;
    display: block;
    text-align: center;
    -webkit-font-smoothing: antialiased;
    /* Sharpen text */
    text-rendering: optimizeLegibility;
}

.play-button-styled:hover {
    transform: scale(1.05);
    background: #003d80;
    box-shadow: 0 0 30px rgba(0, 86, 179, 0.8);
}

/* Hide old elements if present */
.play-icon-large,
.start-text {
    display: none;
}

/* C) FORM ELEMENTS - PROFESSIONAL CARD */
/* C) FORM ELEMENTS - PROFESSIONAL CARD */
.onboarding-form {
    background: transparent;
    max-width: 1100px;
    margin: 1rem 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* Blur Wrapper Logic */
.form-blur-wrapper {
    display: none;
    /* Hidden by default to prevent scroll */
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(25px);
    /* Heavy blur as requested */
    opacity: 0;
    transform: translateY(20px);
}

.form-blur-wrapper.is-briefing {
    display: block;
    opacity: 0.4;
    transform: translateY(0);
}

.form-blur-wrapper.active {
    display: block;
    filter: blur(0);
    opacity: 1;
    pointer-events: auto;
    user-select: auto;
    transform: translateY(0);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
    /* Dense Layout */
    position: relative;
}

/* Form Title inside the card */
.form-card-title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-align: left;
    /* MNCs usually left-align headings */
}

.form-card-subtitle {
    text-align: left;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.form-section {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.radio-group {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    /* Professional standard padding */
    font-size: 1rem;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    color: var(--text-primary);
    height: auto;
}


/* Focus State - High Visibility */
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1);
}

/* Valid State */
.form-control.is-valid {
    border-color: var(--success-color);
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2334a853'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

/* Error State */
.form-control.is-invalid {
    border-color: var(--error-color);
}

.form-text {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.invalid-feedback {
    display: none;
    font-size: 12px;
    color: var(--error-color);
    margin-top: 6px;
}

.form-control.is-invalid+.invalid-feedback {
    display: block;
}

/* D) FILE UPLOAD BOX */
.file-upload-wrapper {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background-color: var(--input-bg);
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.file-upload-wrapper:active {
    transform: scale(0.98);
}

.file-upload-wrapper:hover,
.file-upload-wrapper.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(26, 115, 232, 0.05);
}

.upload-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.file-restrictions {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.preview-container {
    position: relative;
    display: inline-block;
    margin-top: 1rem;
}

.preview-thumbnail {
    max-width: 150px;
    max-height: 150px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: block;
}

.pdf-preview {
    width: 100px;
    height: 120px;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--error-color);
}

.remove-file-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    z-index: 10;
}

.remove-file-btn:hover {
    transform: scale(1.1);
    background: #c62828;
}

.upload-area svg {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    opacity: 0.7;
}

/* E) BUTTONS */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 12px 24px;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 6px;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
    width: auto;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1rem;
    width: auto;
    /* Not always full width for MNCs */
    min-width: 150px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-sm);
}

.btn:disabled {
    background-color: #cccccc;
    border-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* F) FOOTER */
/* F) FOOTER NEW LAYOUT */
/* F) FOOTER - CLEAN & SPACED */
/* F) FOOTER - HIDDEN */
.footer {
    display: none !important;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    justify-content: space-between;
    /* Push left and right apart */
    align-items: flex-start;
    gap: 3rem;
}

.footer-left {
    flex: 1;
    min-width: 280px;
}

.footer-left p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-left a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.footer-left a:hover {
    text-decoration: underline;
}

.footer-right {
    flex: 1;
    min-width: 280px;
    display: flex;
    justify-content: flex-end;
    /* Align links to the right */
}

.footer-links-grid {
    display: flex;
    flex-direction: column;
    /* Stack links neatly */
    gap: 0.8rem;
    text-align: right;
}

.footer-links-grid a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links-grid a:hover {
    color: var(--primary-color);
}

.footer-links-grid a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 3. RESPONSIVE MEDIA QUERIES */

/* Animations Keyframes */
@keyframes simpleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .onboarding-form {
        padding: 2rem;
        max-width: 90%;
    }

    .header {
        padding: 1rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-right {
        justify-content: center;
        width: 100%;
    }

    .footer-links-grid {
        justify-content: center;
        text-align: center;
    }
}

/* --- IMMERSIVE VIDEO MODE --- */
/* Removed Immersive Video Mode */

@media (max-width: 768px) {
    .main-container {
        padding: 1rem 0.5rem;
        /* Tighter padding */
        width: 100%;
        max-width: 100%;
        margin: 0;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
    }

    .header {
        position: relative;
        /* Take up space to prevent overlap */
        flex-direction: column;
        gap: 0.5rem;
        padding: 1.5rem 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        background: #fff;
        z-index: 1001;
        /* Ensure it stays above video */
    }

    .video-title,
    .form-card-title {
        font-size: 1.4rem;
        /* Balanced size for mobile */
        text-align: center;
        line-height: 1.2;
    }

    .video-subtitle,
    .form-card-subtitle {
        font-size: 0.85rem;
        text-align: center;
        margin-bottom: 1rem;
    }

    .phase-indicator {
        width: auto;
        justify-content: center;
        font-size: 0.8rem;
        padding: 4px 12px;
    }

    .onboarding-form {
        padding: 1.5rem 1rem;
        margin: 10px auto;
        /* Added margin */
        max-width: 95%;
        /* Better width */
        border-radius: 12px;
        /* Consistent card look */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        /* Gentle shadow */
        width: 100%;
    }

    .video-section {
        padding: 0;
        background: transparent;
        /* Remove glass effect on mobile for performance/space */
        margin-bottom: 1.5rem;
        width: 100%;
        backdrop-filter: none;
    }

    .video-wrapper {
        border-radius: 8px;
        /* Slightly rounded */
        border: none;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        width: 100%;
        max-width: 100%;
    }

    .btn {
        width: 100%;
        padding: 14px;
        /* Larger touch target */
    }

    .logo img {
        height: 80px;
        /* Increased from 60px for better visibility */
        margin: 0 auto;
    }

    .footer-container {
        padding: 0 1.5rem;
        flex-direction: column;
        text-align: center;
    }

    .footer-left {
        min-width: auto;
    }

    .footer-right {
        justify-content: center;
        margin-top: 1.5rem;
    }

    .footer-links-grid {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        justify-content: center;
    }

    /* Ensure inputs don't zoom on focus */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px !important;
        padding: 12px;
    }

    .form-label {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .btn {
        width: 100% !important;
        padding: 16px !important;
        font-size: 1.1rem;
        border-radius: 8px;
    }

    .file-upload-box {
        padding: 1rem;
    }

    .upload-area {
        padding: 2.5rem 1rem;
    }

    .preview-thumbnail {
        max-width: 100%;
        height: auto;
    }

    /* Fix gap issues */
    body {
        overflow-x: hidden;
    }
}