/* ===================================
   CV UPLOAD MODAL STYLES
   ================================== */

/* Upload CV Button - Desktop Position */
.upload-cv-button {
    position: fixed;
    top: 150px;    
    right: 30px;   
    background: #1976D2;
    color: white;
    padding: 0.25rem 1.8rem;
    border: none;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 4500;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease;
}

.upload-cv-button:hover {
    background: #0D47A1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.upload-cv-button:active {
    transform: translateY(0);
}

/* Modal Overlay */
.cv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.cv-modal-overlay.active {
    display: flex;
}

/* Modal Container */
.cv-modal {
    position: relative;
    max-width: 550px;
    width: 90%;
    max-height: 89vh;
    display: flex;
    flex-direction: column;
    background: #f1f1f1f1;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.cv-modal-header {
    background: #303030;
    color: white;
    padding: 1.4rem 2rem;
    position: relative;
}

.cv-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.cv-modal-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    background: rgb(255, 64, 64);
    border: none;
    color: rgb(0, 0, 0);
    font-size: 2.7rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    font-weight: 400;
    padding: 0;
}

.cv-modal-close:hover {
    background: rgb(255, 64, 64);
    transform:  scale(1.05);
    box-shadow: none;
}

/* Modal Body */
.cv-modal-body {
    padding: 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;    
    flex: 1 1 auto;
}

/* hide scroll bar in chrome, safari */
.cv-modal-body::-webkit-scrollbar {
    display:none;
}

/* ===================================
   FORM SECTION STYLES
   ================================== */

.cv-form-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 2px solid #e3f2fd;
}

.cv-form-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #000000;
    margin: 0 0 1.2rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-form-section-title::before {
    font-size: 1.2rem;
}

/* Form Group Styles */
.cv-upload-form-group {
    margin-bottom: 1.2rem;
}

.cv-upload-form-group:last-child {
    margin-bottom: 0;
}

.cv-upload-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.cv-upload-form-group label span {
    color: #f44336;
    margin-left: 2px;
}

.cv-upload-form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'DM Sans', Arial, sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.cv-upload-form-group input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.cv-upload-form-group input::placeholder {
    color: #999;
}

/* Form Error Styles */
.form-error {
    color: #f44336;
    font-size: 0.85rem;
    margin-top: 0.4rem;
    display: none;
    animation: shake 0.5s;
}

.form-error.active {
    display: block;
}

.cv-upload-form-group input.error {
    border-color: #f44336;
    background: #ffebee;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}


/* Upload Area */
.cv-upload-area {
    border: 3px dashed #000000;
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.cv-upload-area:hover {
    border-color: #1976d2;
    background: #e3f2fd;
    transform: scale(1.02);
}

.cv-upload-area.drag-over {
    border-color: #4caf50;
    background: #e8f5e9;
    transform: scale(1.05);
}

/* Upload Icon/Image */
.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    opacity: 0.7;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
    stroke: #2196f3;
    stroke-width: 2;
}

/* Upload Instructions */
.upload-instructions {
    margin-bottom: 1.5rem;
}

.upload-instructions p {
    font-size: 1.1rem;
    color: #333;
    margin: 0.5rem 0;
    font-weight: 500;
    text-align: center;
}

.upload-instructions small {
    color: #666;
    font-size: 0.9rem;
    display: block;
    margin-top: 0.5rem;
}

/* Browse File Button */
.browse-file-btn {
    background: white;
    color: #2196f3;
    border: 2px solid #2196f3;
    padding: 0.1rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.browse-file-btn:hover {
    background: #2196f3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* File Input (Hidden) */
.cv-file-input {
    display: none;
}

/* File Info Display */
.file-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #e8f5e9;
    border-radius: 6px;
    border-left: 4px solid #4caf50;
    display: none;
}

.file-info.active {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.file-info-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden; 
    white-space: nowrap;
    text-overflow: ellipsis;
}

.file-icon {
    font-size: 2rem;
}

.file-details h4 {
    margin: 0 0 0.3rem 0;
    color: #2e7d32;
    font-size: 1rem;
}

.file-details p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.remove-file-btn {
    margin-left: auto;
    background: #f44336;
    color: white;
    border: none;
    padding: 0.1rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: flex-end;
}

.remove-file-btn:hover {
    background: #fc2d2d;
    transform: scale(1.05);
}

/* Submit Button */
.cv-submit-btn {
    width: 100%;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    display: none;
}

.cv-submit-btn.active {
    display: block;
}

.cv-submit-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.cv-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.cv-submit-btn.uploading {
    background: #ff9800;
    pointer-events: none;
}

/* Progress Bar */
.upload-progress {
    margin-top: 1rem;
    display: none;
}

.upload-progress.active {
    display: block;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Error Message */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #f44336;
    margin-top: 1rem;
    display: none;
    animation: shake 0.5s;
}

.error-message.active {
    display: block;
}

/* Success Message */
.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #4caf50;
    margin-top: 1rem;
    display: none;
}

.success-message.active {
    display: block;
    animation: slideDown 0.3s ease;
}

/* Supported Formats Info */
.supported-formats {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e0e0e0;
}

.supported-formats p {
    color: #666;
    font-size: 0.9rem;
    margin: 0.3rem 0;
    text-align: center;
}

.supported-formats .format-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.format-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #90caf9;
}

/* Responsive Design */
@media (max-width: 768px) {
    #uploadCVBtn {
        position: static;
        display: block;
        width: 100%;
        max-width: 400px;
        margin: -1.5rem auto 1.5rem auto;
        padding: 0.25rem 2rem;
        font-size: 1.1rem;
        border-radius: 8px;
    }

    .cv-modal {
        width: 95%;
    }
    
    .cv-modal-header {
        padding: 1.2rem 1.5rem;
    }
    
    .cv-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .cv-modal-body {
        padding: 1.5rem;
    }
    
    .cv-upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        width: 60px;
        height: 60px;
    }
    
    .upload-instructions p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .upload-cv-button {
        position: static;
        display: block;
        width: 100%;
        margin: -1.5rem auto 1.5rem auto;
        padding: 0.25rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .cv-modal-close {
        top: 0.55rem;
    }

    .file-info-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/*============================
    CV STATUS LINK STYLES
=============================*/

.cv-status {
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--light-gray);
    margin: var(--spacing-xl) 0;
}

.cv-status p {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    text-align: center;
    font-weight: 500;
}

.cv-status-link {
    color: var(--white);
    background-color: var(--primary-blue);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-left: var(--spacing-xs);
    margin-top: var(--spacing-xs);
    transition: background-color 0.2s;
}

.cv-status-link:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

/* Success Container Styles */
#cvSuccessContainer {
    padding: 10px 5px;
    animation: fadeIn 0.5s ease;
}

.success-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.success-check-icon {
    margin-bottom: 10px;
}

.success-title {
    color: #2e7d32;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.success-content {
    color: #444;
    line-height: 1.6;
}

.success-intro {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.success-detail {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.success-email-notice {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #1976d2;
    text-align: left;
}

/* Tracking Token Card */
.token-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.token-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.token-header span:first-child {
    font-size: 0.75rem;
    font-weight: 800;
    color: #9e9e9e;
    letter-spacing: 1px;
}

.token-status-tag {
    background: #fff3e0;
    color: #e65100;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.token-value-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

#displayToken {
    font-family: 'Courier New', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: #000;
    flex-grow: 1;
}

@media (max-width: 768px) {
    #displayToken {
        font-size: 1.2rem;
    }
}
.copy-btn {
    background: #1976d2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    line-height: 1;
    text-align: center;
}

.copy-btn.copied {
    background: #2e7d32;
}

.token-footer p {
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.status-link {
    display: block;
    color: #1976d2;
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}

.status-link:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.success-close-btn {
    width: 100%;
    padding: 12px;
    background: #424242;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
}

.success-close-btn:hover {
    background: #212121;
}