/* CV Matcher Plugin - Updated Styles */
/* Aligned with Recrur brand and GeneratePress */

#cv-matcher-tool {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login Required Styles */
.cv-matcher-login-required {
    text-align: center;
    padding: 60px 40px;
    background: #f7f8f9;
    border: 1px solid #f2f5f7;
    border-radius: 30px;
    margin: 40px auto;
    max-width: 600px;
}

.cv-matcher-login-required h3 {
    color: #111757;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

.cv-matcher-login-required p {
    color: #242424;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 16px;
}

.cv-matcher-login-required a {
    color: #111757;
    text-decoration: underline;
    font-weight: 600;
}

.cv-matcher-login-required a:hover {
    color: #44D2EB;
}

/* Status Messages */
#cv-matcher-tool .status-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-left: 4px solid;
    font-weight: 500;
    border-radius: 4px;
}

#cv-matcher-tool .status-message.success {
    background: #f7f8f9;
    border-color: #111757;
    color: #111757;
}

#cv-matcher-tool .status-message.error {
    background: #fdf2f2;
    border-color: #b41a04;
    color: #b41a04;
}

/* Progress Bar Section */
#cv-matcher-tool .progress-section {
    border: 1px solid #f2f5f7;
    padding: 25px;
    margin-bottom: 30px;
    background: #ffffff;
    text-align: center;
    border-top-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

#cv-matcher-tool .progress-section h3 {
    margin: 0 0 20px 0;
    color: #111757;
    font-size: 20px;
    font-weight: 600;
}

#cv-matcher-tool .progress-bar-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

#cv-matcher-tool .progress-bar {
    width: 100%;
    height: 10px;
    background: #f2f5f7;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

#cv-matcher-tool .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #111757, #44D2EB);
    width: 0%;
    transition: width 0.3s ease;
}

#cv-matcher-tool .progress-text {
    font-size: 14px;
    color: #242424;
    font-weight: 500;
}

/* Upload Section (Moved to bottom) */
#cv-matcher-tool .upload-section {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

#cv-matcher-tool .upload-form {
    flex: 1;
    border: 1px solid #f2f5f7;
    padding: 25px;
    background: #ffffff;
    text-align: center;
    transition: all 0.3s ease;
    border-top-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

#cv-matcher-tool .upload-form h3 {
    margin: 0 0 20px 0;
    color: #111757;
    font-size: 20px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #111757;
}

#cv-matcher-tool .upload-form input[type="file"] {
    margin: 15px 0;
    width: 100%;
    padding: 10px;
    border: 1px solid #f2f5f7;
    background: #f7f8f9;
    border-radius: 4px;
}

#cv-matcher-tool .upload-form button[type="submit"] {
    /* Let GeneratePress handle button styling globally */
    margin-top: 15px;
    border-top-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Main Container */
#cv-matcher-tool .cv-matcher-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

#cv-matcher-tool .job-ads-section,
#cv-matcher-tool .cvs-section {
    flex: 1;
    border: 1px solid #f2f5f7;
    padding: 25px;
    background: #ffffff;
    border-top-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

/* Section Headers */
#cv-matcher-tool .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #111757;
}

#cv-matcher-tool .section-header h2 {
    margin: 0;
    color: #111757;
    font-size: 20px;
    font-weight: 600;
}

/* Bulk Actions */
#cv-matcher-tool .bulk-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 14px;
}

#cv-matcher-tool .bulk-actions label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #242424;
    cursor: pointer;
}

#cv-matcher-tool .bulk-actions input[type="checkbox"] {
    margin: 0;
}

/* Match Job Button - Square with rounded corners */
#cv-matcher-tool .match-job-btn {
    background: #111757;
    color: #ffffff;
    border: none;
    width: 36px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    margin-right: 10px;
    border-top-left-radius: 10px;
    border-bottom-right-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#cv-matcher-tool .match-job-btn:hover {
    background: #44D2EB;
    color: #121212;
    transform: translateY(-2px);
}

#cv-matcher-tool .match-job-btn:disabled {
    background: #242424;
    cursor: not-allowed;
    transform: none;
}

/* Open Job/CV Buttons - Match other button styling */
#cv-matcher-tool .open-job-btn,
#cv-matcher-tool .open-cv-btn,
#cv-matcher-tool .view-cv-btn {
    background: #111757;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-top-left-radius: 10px;
    border-bottom-right-radius: 10px;
    margin: 10px 0;
}

#cv-matcher-tool .open-job-btn:hover,
#cv-matcher-tool .open-cv-btn:hover,
#cv-matcher-tool .view-cv-btn:hover {
    background: #44D2EB;
    color: #121212;
    transform: translateY(-2px);
}

/* Additional margin for post-match view CV button */
#cv-matcher-tool .view-cv-btn {
    margin-top: 25px;
}

/* Delete Buttons - Lightweight style */
#cv-matcher-tool .bulk-delete-btn {
    background: #f7f8f9;
    color: #b41a04;
    border: 1px solid #b41a04;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-top-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

#cv-matcher-tool .bulk-delete-btn:hover {
    background: #b41a04;
    color: #ffffff;
    transform: translateY(-2px);
}

#cv-matcher-tool .bulk-delete-btn:disabled {
    background: #f2f5f7;
    color: #242424;
    border-color: #242424;
    cursor: not-allowed;
    transform: none;
}

/* Content Popup Modal */
#cv-matcher-tool .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cv-matcher-tool .modal-content {
    background: #ffffff;
    border-radius: 8px;
    max-width: 80%;
    max-height: 80%;
    width: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#cv-matcher-tool .modal-header {
    padding: 20px;
    border-bottom: 1px solid #f2f5f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#cv-matcher-tool .modal-header h3 {
    margin: 0;
    color: #111757;
    font-size: 18px;
    font-weight: 600;
}

#cv-matcher-tool .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #242424;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cv-matcher-tool .modal-close:hover {
    color: #b41a04;
}

#cv-matcher-tool .modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #242424;
}

/* Enhanced content formatting with line breaks */
#cv-matcher-tool .content-preview,
#cv-matcher-tool .content-full,
#cv-matcher-tool #content-popup-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* File Lists - Increased height */
#cv-matcher-tool .file-list-container {
    max-height: 800px;
    overflow-y: auto;
    padding: 10px 0;
}

#cv-matcher-tool #job-list,
#cv-matcher-tool #cv-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#cv-matcher-tool .file-item {
    margin-bottom: 15px;
    border: 1px solid #f2f5f7;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(17, 23, 87, 0.05);
    border-radius: 8px;
}

#cv-matcher-tool .file-item:hover {
    background: #f7f8f9;
    border-color: #44D2EB;
    box-shadow: 0 2px 8px rgba(68, 210, 235, 0.15);
}

#cv-matcher-tool .file-header {
    display: flex;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    position: relative;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 60px;
}

#cv-matcher-tool .file-name {
    flex: 1;
    font-weight: 500;
    margin: 0 10px;
    cursor: pointer;
    min-width: 200px;
    font-size: 15px;
}

#cv-matcher-tool .empty-state {
    padding: 50px 20px;
    text-align: center;
    color: #242424;
    font-style: italic;
    border: 2px dashed #f2f5f7;
    background: #f7f8f9;
    border-radius: 8px;
}

/* File Checkboxes - Adjusted position since no delete buttons */
#cv-matcher-tool .file-checkbox {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

/* Content Areas - Updated formatting */
#cv-matcher-tool .file-content {
    padding: 20px;
    background: #f7f8f9;
    border-top: 1px solid #f2f5f7;
    font-size: 14px;
    line-height: 1.6;
    color: #242424;
}

#cv-matcher-tool .content-preview,
#cv-matcher-tool .content-full {
    margin-bottom: 15px;
    white-space: pre-line;
    word-wrap: break-word;
}

#cv-matcher-tool .expand-content-btn {
    background: #111757;
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-top-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

#cv-matcher-tool .expand-content-btn:hover {
    background: #44D2EB;
    color: #121212;
}

/* Match Explanation Section */
#cv-matcher-tool .match-explanation {
    padding: 20px;
    background: #f7f8f9;
    border-top: 1px solid #f2f5f7;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

#cv-matcher-tool .explanation-content {
    font-size: 14px;
    line-height: 1.6;
    color: #242424;
    border-left: 4px solid #111757;
    padding: 15px;
    background: #ffffff;
    border-radius: 4px;
}

/* Match Scores - Added spacing from checkbox */
#cv-matcher-tool .match-score {
    font-weight: 600;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 14px;
    min-width: 50px;
    text-align: center;
    margin: 0 20px 0 10px;
    border-radius: 20px;
}

#cv-matcher-tool .high-match {
    background-color: #03b068;
}

#cv-matcher-tool .medium-match {
    background-color: #e29c04;
    color: #121212;
}

#cv-matcher-tool .low-match {
    background-color: #b41a04;
}

/* Loading States */
#cv-matcher-tool .match-score:contains("⏳") {
    background-color: #44D2EB;
    color: #121212;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

/* Focus States for Accessibility */
#cv-matcher-tool input:focus,
#cv-matcher-tool button:focus {
    outline: 2px solid #44D2EB;
    outline-offset: 2px;
}

/* Error and Success States */
#cv-matcher-tool .match-score:contains("❌") {
    background-color: #b41a04;
    color: #ffffff;
}

/* Button hover effects */
button[type="submit"],
#cv-matcher-tool .match-job-btn,
#cv-matcher-tool .bulk-delete-btn {
    -webkit-transition: all 500ms ease-in-out !important;
    transition: all 500ms ease-in-out !important;
}

button[type="submit"]:hover {
    -webkit-transform: translate3d(0, -4px, 0);
    transform: translate3d(0, -4px, 0);
}

/* Responsive Design */
@media (max-width: 768px) {
    #cv-matcher-tool .cv-matcher-container {
        flex-direction: column;
        gap: 20px;
    #cv-matcher-tool .file-name {
        font-size: 14px;
    }
}
    
    #cv-matcher-tool .upload-section {
        flex-direction: column;
        gap: 15px;
    }
    
    #cv-matcher-tool .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    #cv-matcher-tool .bulk-actions {
        align-self: stretch;
        justify-content: space-between;
    }
    
    #cv-matcher-tool .file-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px;
    }
    
    #cv-matcher-tool .file-name {
        flex-basis: 100%;
        margin: 0 0 10px 0;
        min-width: auto;
    }
    
    #cv-matcher-tool .file-checkbox {
        position: static;
        transform: none;
        margin: 5px 0;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    #cv-matcher-tool {
        padding: 15px;
    }
    
    #cv-matcher-tool .job-ads-section,
    #cv-matcher-tool .cvs-section {
        padding: 15px;
    }
    
    #cv-matcher-tool .upload-form {
        padding: 20px;
    }
    
    #cv-matcher-tool .file-header {
        padding: 15px;
        min-height: 50px;
    }
    
    #cv-matcher-tool .file-list-container {
        max-height: 600px;
    }
    
    #cv-matcher-tool .match-job-btn {
        width: 32px;
        height: 28px;
        font-size: 14px;
    }
    
    #cv-matcher-tool .modal-content {
        max-width: 95%;
        max-height: 90%;
    }
    
    #cv-matcher-tool .modal-header {
        padding: 15px;
    }
    
    #cv-matcher-tool .modal-body {
        padding: 15px;
    }
}