/**
 * Perfect Matches Styles
 * Goldman Sachs | JPMorgan | Morgan Stanley Standards
 * Elite Investment Banking Aesthetic
 */

/* Import Comprehensive Elite Banking Design System */
@import url('elite-banking-design-system.css');

/* Container */
.sffc-perfect-matches {
    margin: 30px 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.sffc-perfect-matches-header {
    background: linear-gradient(135deg, #132D51 0%, #2C5530 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.sffc-pm-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sffc-pm-icon {
    font-size: 28px;
}

.sffc-pm-subtitle {
    margin: 5px 0 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Statistics */
.sffc-pm-stats {
    display: flex;
    gap: 30px;
}

.sffc-pm-stat {
    text-align: center;
}

.sffc-pm-stat-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.sffc-pm-stat-label {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Refresh Button */
.sffc-pm-refresh {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sffc-pm-refresh:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sffc-pm-refresh.spinning span:first-child {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Container */
.sffc-perfect-matches-container {
    padding: 30px;
    min-height: 400px;
    position: relative;
}

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

.sffc-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2C5530;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.sffc-pm-loading p {
    margin-top: 20px;
    color: #666;
    font-size: 16px;
}

/* Content Grid */
.sffc-pm-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

/* Carousel Style */
.sffc-perfect-matches-container.carousel .sffc-pm-content {
    display: flex;
    gap: 20px;
    overflow: hidden;
}

/* Match Card */
.sffc-pm-card {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.sffc-pm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #132D51;
}

/* Perfect Match Badge */
.sffc-pm-badge,
.sffc-match-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sffc-pm-percentage {
    font-size: 24px;
    font-weight: bold;
}

.sffc-pm-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Card Body */
.sffc-pm-body {
    padding: 20px;
}

.sffc-pm-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.sffc-pm-company {
    color: #666;
    font-size: 16px;
    margin-bottom: 12px;
}

/* Meta Information */
.sffc-pm-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e8e8;
}

.sffc-pm-meta span {
    font-size: 14px;
    color: #555;
}

/* Match Factors */
.sffc-pm-factors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.sffc-match-factor {
    background: #f0f4ff;
    color: #132D51;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Description */
.sffc-pm-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Actions */
.sffc-pm-actions {
    display: flex;
    gap: 10px;
}

.sffc-pm-actions button {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sffc-btn-primary {
    background: #132D51;
    color: white;
}

.sffc-btn-primary:hover {
    background: #0F1F3A;
}

.sffc-btn-secondary {
    background: #e8e8e8;
    color: #333;
}

.sffc-btn-secondary:hover {
    background: #d8d8d8;
}

.sffc-btn-success {
    background: #2C5530;
    color: white;
}

.sffc-btn-success:hover {
    background: #1F3B22;
}

/* Viewed/Applied States */
.sffc-pm-card.sffc-viewed {
    opacity: 0.85;
}

.sffc-pm-card.sffc-viewed::after {
    content: 'VIEWED';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.sffc-pm-card.sffc-applied .sffc-pm-badge {
    background: linear-gradient(135deg, #2C5530 0%, #1F3B22 100%);
}

.sffc-pm-card.sffc-applied::after {
    content: 'APPLIED';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

/* Navigation */
.sffc-pm-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-top: 1px solid #e8e8e8;
}

.sffc-pm-nav-prev,
.sffc-pm-nav-next {
    background: #132D51;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.sffc-pm-nav-prev:hover,
.sffc-pm-nav-next:hover {
    background: #5a67d8;
    transform: scale(1.1);
}

.sffc-pm-nav-prev:disabled,
.sffc-pm-nav-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dots */
.sffc-pm-dots {
    display: flex;
    gap: 8px;
}

.sffc-pm-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d8d8d8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sffc-pm-dot.active {
    background: #132D51;
    transform: scale(1.3);
}

/* Empty State */
.sffc-pm-empty {
    text-align: center;
    padding: 60px 20px;
}

.sffc-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.sffc-pm-empty h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.sffc-pm-empty p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Notification */
.sffc-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 10000;
    max-width: 350px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
    }
    to {
        transform: translateX(0);
    }
}

.sffc-notification-success {
    background: #27ae60;
}

.sffc-notification-error {
    background: #e74c3c;
}

.sffc-notification-info {
    background: #3498db;
}

/* Responsive */
@media (max-width: 1200px) {
    .sffc-pm-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sffc-pm-stats {
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .sffc-perfect-matches-header {
        padding: 20px;
    }
    
    .sffc-pm-title h2 {
        font-size: 22px;
    }
    
    .sffc-pm-stat-value {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .sffc-perfect-matches-header {
        flex-direction: column;
        text-align: center;
    }
    
    .sffc-pm-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .sffc-pm-content {
        grid-template-columns: 1fr;
    }
    
    .sffc-pm-actions {
        flex-direction: column;
    }
    
    .sffc-pm-actions button {
        width: 100%;
    }
    
    .sffc-perfect-matches-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .sffc-pm-title h2 {
        font-size: 20px;
    }
    
    .sffc-pm-stat-value {
        font-size: 20px;
    }
    
    .sffc-pm-stat-label {
        font-size: 10px;
    }
    
    .sffc-pm-card {
        padding: 15px;
    }
    
    .sffc-pm-refresh {
        padding: 6px 12px;
        font-size: 12px;
    }
}