/*
    CSS for Responsive Resume Review Page
    Brand Colors:
    - Primary Blue: #2563eb (Used for accents, icons, and buttons)
    - Secondary Blue/Purple: #5146d8 (Used for form elements)
    - Dark Text: #1e293b / #0A165E
    - Light Background: #f9f9ff
*/

/* --- Base Styles --- */
:root {
    --color-primary: #2563eb;
    --color-secondary: #5146d8;
    --color-dark: #1e293b;
    --color-text: #334155;
    --color-light-bg: #f9f9ff;
    --color-white: #ffffff;
    --color-border: #e5e7eb;
    --color-error: #D9534F;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Sora', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: #f4f7fa; /* Slightly off-white body background */
}

.resume-review-main {
    padding: 40px 20px;
}

.review-container {
    max-width: 1200px;
    margin: 0 auto;
}

.review-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-dark);
    text-align: center;
    margin-bottom: 20px; /* Reduced margin to make space for new intro text */
}

/* NEW: Top Introductory Text */
.info-intro-text-top {
    font-size: 16px;
    margin-bottom: 30px;
    color: var(--color-text);
    line-height: 1.5;
    text-align: center;
    padding: 0 3px;
}

/* --- Layout Wrapper (Desktop: Columns, Mobile: Stacked) --- */
.review-content-wrapper {
    display: flex;
    flex-direction: column; /* Default to stacked for mobile */
    gap: 40px;
}

/* --- Form Column Styles --- */
.review-form-column {
    order: -1; /* Form appears first on mobile/tablet */
    flex: 1;
}

.review-form-card {
    background: var(--color-white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 .185rem 1.25rem rgba(10, 10, 10, .095) !important;
}

.form-card-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 25px;
    text-align: center;
}

.form-group-review {
    margin-bottom: 20px;
}

.form-label-review {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 8px;
}

/* Hide label for name field when using placeholder */
.form-label-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.form-input-review,
.form-select-review,
.form-textarea-review {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input-review:focus,
.form-select-review:focus,
.form-textarea-review:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-textarea-review {
    resize: vertical;
}

/* Custom File Upload Zone */
.resume-upload-zone {
    border: 2px dashed var(--color-secondary);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: var(--color-light-bg);
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
}

.resume-upload-zone:hover,
.resume-upload-zone.dragover-review {
    background: #eef0ff; /* Lighter hover background */
    border-color: var(--color-primary);
}

.upload-label-review {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--color-secondary);
    font-weight: 500;
    cursor: pointer;
}

.upload-label-review i {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.upload-formats-text {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 8px;
}

.upload-error-message {
    color: var(--color-error);
    font-size: 0.85rem;
    min-height: 18px;
    margin-top: 6px;
}

.submit-button-review {
    width: 100%;
    padding: 15px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.submit-button-review:hover {
    background-color: #1d55d8; /* Slightly darker primary */
    transform: translateY(-1px);
}

/* --- Info Column Styles --- */
.review-info-column {
    order: 1; /* Content appears second on mobile/tablet */
    flex: 1;
}

/* Feature List */
.info-features-list {
    margin-bottom: 40px;
}

.feature-item-review {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item-review:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon-review {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-right: 20px;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.1);
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.feature-text-review {
    /* Default: Text is next to icon */
    flex-grow: 1;
}

.feature-title-review {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--color-dark);
    font-weight: 600;
}

.feature-description-review {
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    font-size: 0.95rem;
}

/* Stats Bar */
.info-stats-bar {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    padding: 15px 0;
}

.stat-item-review {
    text-align: center;
    flex: 1;
    background: var(--color-white);
    padding: 20px 10px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.stat-value-review {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 5px;
}

.stat-label-review {
    color: #64748b;
    font-size: 0.85rem;
}


/* --- Responsive Media Queries --- */

/* Small Mobile (up to 480px) - Apply custom feature layout here */
@media (max-width: 480px) {
    .review-page-title {
        font-size: 22px !important;
        margin-bottom: 10px !important;
    }
    .review-form-card {
        padding: 20px !important;
    }
    .form-card-title {
        font-size: 1.5rem !important;
    }
    
    /* Custom Feature Layout for Mobile ONLY */
    .feature-item-review {
        /* flex-direction: column;  Stack icon/title row and description row */
        align-items: stretch;
    }

    .feature-icon-review {
        margin-right: 10px !important;
        margin-bottom: 10px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }

    .feature-header-mobile {
        display: flex !important;
        align-items: center !important;
        margin-bottom: 10px !important;
    }

    .feature-text-review {
        /* Reset flex-grow to allow for stacking */
        flex-grow: unset;
    }

    .feature-title-review {
        margin-bottom: 0 !important; 
        font-size: 1.1rem !important;
    }

    .feature-description-review {
        /* Description is now the second row */
        margin-top: 5px !important;
    }

    .info-stats-bar {
        flex-direction: column !important;
    }
    .stat-item-review {
        padding: 15px !important;
    }
    .upload-label-review span {
    font-size: 15px !important;
    font-weight: 500 !important;
    }
    .upload-formats-text {
        font-size: 10.7px !important;
    }
    .form-input-review {
        font-size: 14px !important; 
    }
    .review-form-column {      
        margin-top: 5%;
    }
}

/* Mobile (481px to 575px) - Standard layout for features, stacked for main columns */
@media (min-width: 481px) and (max-width: 575px) {
    .info-stats-bar {
        flex-wrap: wrap;
    }
    .stat-item-review {
        flex: 1 1 calc(50% - 15px); /* Two stats per row */
    }
    .stat-item-review:last-child {
        flex: 1 1 100%; /* Last one takes full width */
    }
}

/* Tablet (576px to 795px) - Standard layout for features, stacked for main columns */
@media (min-width: 576px) and (max-width: 795px) {
    .review-content-wrapper {
        flex-direction: column; /* Still stacked, form on top */
    }
    .review-form-column {
        order: -1;
    }
    .review-info-column {
        order: 1;
    }
    .info-stats-bar {
        flex-wrap: wrap;
    }
    .stat-item-review {
        flex: 1 1 calc(33.333% - 10px); /* Three stats per row */
    }
}

/* Tablet/Small Laptop (796px to 1199px) - Transition to side-by-side */
@media (min-width: 796px) and (max-width: 1199px) {
    .review-content-wrapper {
        flex-direction: row; /* Side-by-side */
        align-items: flex-start;
    }
    .review-form-column {
        order: 1; /* Form on the right */
        flex: 1 1 45%;
    }
    .review-info-column {
        order: -1; /* Content on the left */
        flex: 1 1 55%;
        padding-right: 20px; /* Add some space between columns */
    }
    .review-page-title {
        text-align: left;
    }
    .info-intro-text-top {
        text-align: left;
    }
    .info-stats-bar {
        flex-wrap: nowrap;
    }
}

/* Laptop/Desktop (1200px and up) */
@media (min-width: 1200px) {
    .review-content-wrapper {
        flex-direction: row; /* Side-by-side */
        align-items: flex-start;
        gap: 60px;
    }
    .review-form-column {
        order: 1; /* Form on the right */
        flex: 0 0 40%; /* Form takes 40% width */
        max-width: 40%;
        margin-top: -8%;
    }
    .review-info-column {
        order: -1; /* Content on the left */
        flex: 0 0 60%; /* Content takes 60% width */
        max-width: 60%;
    }
    .review-page-title {
        text-align: left;
    }
    .info-intro-text-top {
        text-align: left;
        width: 60%;
    }
    .info-stats-bar {
        flex-wrap: nowrap;
    }
}

/* File Upload Preview Styles */
.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 15px;
    animation: fadeIn 0.3s ease-in-out;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
}

.file-info i {
    font-size: 1.8rem;
    color: var(--color-primary);
    background: rgba(37, 99, 235, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.file-name {
    font-weight: 600;
    color: var(--color-dark);
    font-size: 1rem;
    margin-bottom: 4px;
    height: 1.5rem;
    overflow: hidden;
}

.file-size {
    color: #64748b;
    font-size: 0.85rem;
}

.remove-file {
    cursor: pointer;
    color: #ef4444;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(239, 68, 68, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

.remove-file i {
    font-size: 1.2rem;
    color: #ef4444;
}

/* Upload Zone States */
.resume-upload-zone.dragover {
    background: #eef0ff;
    border-color: var(--color-primary);
    transform: scale(1.02);
}

.resume-upload-zone.dragover .upload-label-review {
    color: var(--color-primary);
}

.resume-upload-zone.dragover .upload-label-review i {
    color: var(--color-primary);
}

/* Upload Label Styles */
.upload-label-review {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--color-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-label-review i {
    font-size: 2.5rem;
    color: var(--color-secondary);
    transition: all 0.3s ease;
}

.upload-label-review span {
    font-size: 1rem;
    font-weight: 500;
}

/* Upload Formats Text */
.upload-formats-text {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 8px;
    text-align: center;
}

/* Upload Error Message */
.upload-error-message {
    color: var(--color-error);
    font-size: 0.85rem;
    min-height: 18px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(217, 83, 79, 0.1);
    border-radius: 6px;
    border-left: 3px solid var(--color-error);
    display: none;
}

/* Animation for file preview */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success state for valid file */
.file-preview.valid {
    border-color: #10b981;
    background: #f0fdf4;
}

/* Responsive adjustments for file preview */
@media (max-width: 480px) {
    .file-preview {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .file-info {
        width: 100%;
    }
    
    .remove-file {
        align-self: flex-end;
        margin-top: -45px;
        position: relative;
    }
    
    .file-info i {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    .resume-upload-zone {
        padding: 5px !important;
    }
    .upload-label-review {
        gap: 0px !important;
    }
    .resume-review-main {
        padding: 10px 5px;
    }
}

/* Hover effects for upload zone */
.resume-upload-zone:hover:not(.dragover) {
    border-color: var(--color-primary);
    background: #f5f7ff;
}

.resume-upload-zone:hover:not(.dragover) .upload-label-review {
    color: var(--color-primary);
}

.resume-upload-zone:hover:not(.dragover) .upload-label-review i {
    color: var(--color-primary);
}
/* =============================================
   WHATSAPP COMPLIANCE & COUNTRY CODE STYLES
   Add these to your existing CSS
============================================= */

/* WhatsApp Compliance Notice */
.whatsapp-compliance-notice {
    background: linear-gradient(135deg, #25D36610 0%, #128C7E08 100%);
    border: 1px solid #25D36630;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.whatsapp-compliance-notice::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #25D366, #128C7E);
}

.whatsapp-compliance-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.whatsapp-compliance-icon {
    background: #25D366;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.whatsapp-compliance-title {
    font-size: 16px;
    font-weight: 600;
    color: #0a165e;
    margin: 0;
}

.whatsapp-compliance-text {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Enhanced Phone Input with Country Code */
.phone-input-group {
    position: relative;
    margin-bottom: 10px;
}

.phone-input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0a165e;
    font-size: 15px;
}

.phone-input-container {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.phone-input-container:focus-within {
    border-color: #0a165e;
    box-shadow: 0 0 0 2px rgba(10, 22, 94, 0.1);
}

.country-code-section {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    height: 48px;
    min-width: 100px;
    position: relative;
}

.country-flag {
    font-size: 22px;
    margin-right: 8px;
    width: 30px;
    text-align: center;
}

.country-code-input {
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: #0a165e;
    width: 60px;
    padding: 4px 0;
    outline: none;
}

.country-code-input::placeholder {
    color: #999;
    font-weight: normal;
}

.country-code-hint {
    position: absolute;
    top: -18px;
    left: 0;
    font-size: 11px;
    color: #666;
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #eee;
    display: none;
}

.country-code-section:hover .country-code-hint {
    display: block;
}

.phone-number-input {
    flex: 1;
    border: none;
    padding: 14px 15px;
    font-size: 15px;
    outline: none;
    min-width: 0;
}

.phone-number-input::placeholder {
    color: #999;
}

.phone-validation-message {
    font-size: 13px;
    margin-top: 5px;
    padding-left: 5px;
    display: none;
}

.phone-validation-message.valid {
    color: #25D366;
    display: block;
}

.phone-validation-message.invalid {
    color: #ff4757;
    display: block;
}

.phone-instruction {
    color: #666;
    font-size: 13px;
    display: block;
    margin-top: 6px;
    padding-left: 5px;
}

.phone-instruction i {
    color: #25D366;
    margin-right: 4px;
}

/* Country Code Suggestions Dropdown */
.country-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    margin-top: 2px;
}

.country-suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.country-suggestion-item:last-child {
    border-bottom: none;
}

.country-suggestion-item:hover {
    background: #f8f9fa;
}

.country-suggestion-flag {
    font-size: 20px;
    margin-right: 10px;
    width: 30px;
    flex-shrink: 0;
}

.country-suggestion-code {
    font-weight: 600;
    color: #0a165e;
    min-width: 60px;
    flex-shrink: 0;
}

.country-suggestion-name {
    color: #666;
    font-size: 14px;
    flex: 1;
}

/* Form Submission Enhancement */
.submit-button-review.whatsapp-enhanced {
    background: linear-gradient(135deg, #0a165e 0%, #2d4eff 100%);
    position: relative;
    overflow: hidden;
}

.submit-button-review.whatsapp-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 22, 94, 0.3);
}

.submit-button-review.whatsapp-enhanced::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.submit-button-review.whatsapp-enhanced:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Success Message */
.whatsapp-success-message {
    display: none;
    background: linear-gradient(135deg, #25D36615, #128C7E10);
    border: 1px solid #25D36630;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.whatsapp-success-icon {
    font-size: 48px;
    color: #25D366;
    margin-bottom: 15px;
    animation: bounce 1s ease infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

.whatsapp-success-title {
    color: #25D366;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.whatsapp-success-text {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .phone-input-container {
        flex-direction: column;
        border: none;
        background: transparent;
        align-items: stretch;
    }
    
    .country-code-section {
        border: 1px solid #ddd;
        border-radius: 5px;
        margin-bottom: 10px;
        border-right: none;
        min-width: 100%;
        height: 46px;
    }
    
    .phone-number-input {
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 12px 15px;
    }
    
    .whatsapp-compliance-notice {
        padding: 14px 16px;
    }
    
    .whatsapp-compliance-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .whatsapp-compliance-text {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .country-code-section {
        min-width: 100px;
    }
    
    .country-code-input {
        width: 50px;
        font-size: 14px;
    }
    
    .phone-number-input {
        font-size: 14px;
    }
}

/* File Upload Enhancement */
.resume-upload-zone.whatsapp-enhanced {
    border: 2px dashed #0a165e;
    background: #f8f9ff;
    transition: all 0.3s ease;
}

.resume-upload-zone.whatsapp-enhanced:hover {
    border-color: #2d4eff;
    background: #eef0ff;
    transform: translateY(-2px);
}

.resume-upload-zone.whatsapp-enhanced.drag-over {
    border-color: #25D366;
    background: #25D36610;
}

/* Loading State */
.form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

/* Privacy Note */
.privacy-note {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 13px;
}

.privacy-note i {
    color: #0a165e;
    margin-right: 5px;
}

/* Enhanced Select Styling */
.form-select-review.whatsapp-enhanced {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230a165e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
    appearance: none;
}

.form-select-review.whatsapp-enhanced:focus {
    border-color: #0a165e;
    box-shadow: 0 0 0 2px rgba(10, 22, 94, 0.1);
}

/* Enhanced Textarea */
.form-textarea-review.whatsapp-enhanced {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.form-textarea-review.whatsapp-enhanced:focus {
    border-color: #0a165e;
    box-shadow: 0 0 0 2px rgba(10, 22, 94, 0.1);
}

/* Country Flag Emoji - Proper Rendering */
#countryFlag {
    font-family: 'Noto Color Emoji', "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", system-ui, sans-serif;
    font-size: 20px;
    line-height: 1;
    letter-spacing: 0;
    word-spacing: 0;
    word-break: normal;
    pointer-events: none;
}