/* ============================================
   MATCHING MODULE STYLES
   ============================================ */

/* Match Modal */
#match-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in;
}

#match-modal.open {
    display: flex;
}

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

.match-modal-content {
    background-color: white;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

.match-modal-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.match-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.match-modal-header .close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.match-modal-header .close:hover {
    background: rgba(255, 255, 255, 0.2);
}

#match-content {
    padding: 30px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Match Card */
.match-card {
    width: 100%;
    position: relative;
}

.match-score-badge {
    position: absolute;
    top: -40px;
    right: 20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: pop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.match-score-badge .score-value {
    font-size: 28px;
    line-height: 1;
}

.match-score-badge .score-label {
    font-size: 0.875rem; /* 14px - WCAG minimum */
    margin-top: 4px;
}

.match-title {
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    padding-right: 60px;
}

.match-details {
    margin-bottom: 25px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
}

.detail-value {
    text-align: right;
    color: #333;
    font-weight: 500;
}

.detail-description {
    margin: 10px 0 0 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Match Actions */
.match-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.match-actions .btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.match-actions .btn-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.match-actions .btn-secondary:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.match-actions .btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.match-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.match-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-spinner p {
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* No Matches State */
.no-matches {
    text-align: center;
    padding: 40px 20px;
}

.no-matches p {
    font-size: 24px;
    color: #666;
    margin: 0 0 10px 0;
}

.no-matches small {
    color: #999;
    font-size: 14px;
}

/* Find Job Button */
#btn-find-job {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

#btn-find-job:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#btn-find-job:active {
    transform: translateY(0);
}

/* Alerts */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 2000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background-color: #4CAF50;
    color: white;
}

.alert-error {
    background-color: #f44336;
    color: white;
}

/* Responsive */
@media (max-width: 767px) {
    .match-modal-content {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 80vh;
    }

    .match-title {
        font-size: 20px;
        padding-right: 40px;
    }

    .match-score-badge {
        width: 70px;
        height: 70px;
        top: -30px;
        right: 15px;
    }

    .match-score-badge .score-value {
        font-size: 24px;
    }

    #match-content {
        padding: 20px;
        min-height: 300px;
    }
}
