/* 
 * Rajayog Matching Module Styles
 * Modern and attractive matching templates
 */

/* ==========================================================================
   Page Header
   ========================================================================== */
.matching-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0 2rem;
    margin-bottom: 2rem;
    border-radius: 0 0 1.5rem 1.5rem;
}

.matching-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.matching-header p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 0;
}

/* ==========================================================================
   Match Cards (List View)
   ========================================================================== */
.match-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-fast);
    overflow: hidden;
    height: 100%;
}

.match-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.match-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-bottom: none;
}

.match-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.match-card-body {
    padding: 1.5rem;
}

.match-score-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.match-score-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.match-score-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.match-progress {
    height: 24px;
    border-radius: var(--border-radius);
    background: #e9ecef;
    overflow: hidden;
}

.match-progress-bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: width 0.6s ease;
}

.match-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.match-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Empty State */
.match-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.match-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* ==========================================================================
   Match Form (Create/Select Charts)
   ========================================================================== */
.chart-selection-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.section-icon {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    padding-left: 2.5rem;
    border-radius: var(--border-radius);
    border: 2px solid #dee2e6;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.search-box-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #6c757d;
    pointer-events: none;
}

.chart-section {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    background: white;
}

.chart-option {
    display: block;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: white;
}

.chart-option:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.chart-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8f9ff 0%, #eff1ff 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.chart-option input[type="radio"] {
    display: none;
}

.chart-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.chart-details {
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chart-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.quick-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 1rem;
    transition: all var(--transition-fast);
}

.quick-action:hover {
    color: var(--primary-dark);
    gap: 0.75rem;
}

/* Selected Charts Summary */
.selected-summary {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    margin: 1.5rem 0;
}

.selected-item {
    font-size: 0.95rem;
    color: #495057;
}

.selected-name {
    font-weight: 600;
    color: var(--primary-color);
}

/* Match Preview */
.match-preview {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    margin: 2rem 0;
}

.preview-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 1rem;
}

.preview-score-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.preview-score-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Loading Spinner */
.htmx-indicator {
    display: none;
}

.htmx-indicator.htmx-request {
    display: block;
    text-align: center;
    padding: 2rem;
}

/* ==========================================================================
   Match Detail View
   ========================================================================== */
.couple-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.couple-section {
    padding: 1.5rem;
}

.person-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
}

.person-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.person-details {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Score Display */
.score-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.score-header {
    padding: 1.5rem;
    color: white;
}

.score-body {
    padding: 2rem;
}

.score-circle-large {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.score-number {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

.score-max {
    font-size: 1.2rem;
    opacity: 0.9;
}

.compatibility-label {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.compatibility-desc {
    font-size: 1rem;
    color: #6c757d;
}

/* Koot Analysis Table */
.koot-table {
    border-collapse: separate;
    border-spacing: 0;
}

.koot-table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    font-weight: 600;
    border: none;
}

.koot-table tbody tr {
    transition: all var(--transition-fast);
}

.koot-table tbody tr:hover {
    background: #f8f9ff;
}

.koot-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.koot-table tfoot {
    background: #f8f9fa;
    font-weight: 700;
}

.koot-name {
    font-weight: 600;
    color: var(--primary-color);
}

.koot-score-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.koot-score-bar {
    width: 60px;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.koot-score-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.6s ease;
}

/* Nakshatra Cards */
.nakshatra-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nakshatra-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 1rem;
    font-weight: 600;
    color: #212529;
}

.nakshatra-body {
    padding: 1.5rem;
    text-align: center;
}

.nakshatra-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Dosha Cards */
.dosha-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.dosha-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dosha-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.dosha-present {
    background: #fee;
    color: #dc3545;
}

.dosha-absent {
    background: #d4edda;
    color: #28a745;
}

/* Actions Sidebar */
.actions-sidebar {
    position: sticky;
    top: 100px;
}

.action-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Info Boxes */
.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: none;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
}

.info-box h5 {
    color: #1565c0;
    font-weight: 700;
    margin-bottom: 1rem;
}

.info-box ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.info-box li {
    margin-bottom: 0.5rem;
    color: #495057;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 991.98px) {
    .matching-header {
        padding: 2rem 0 1.5rem;
    }
    
    .matching-header h1 {
        font-size: 2rem;
    }
    
    .chart-selection-section {
        padding: 1.5rem;
    }
    
    .score-circle-large {
        width: 120px;
        height: 120px;
    }
    
    .score-number {
        font-size: 3rem;
    }
    
    .actions-sidebar {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    .matching-header h1 {
        font-size: 1.75rem;
    }
    
    .chart-section {
        max-height: 300px;
    }
    
    .chart-details {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .match-actions {
        flex-direction: column;
    }
    
    .match-actions .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.match-card,
.chart-option,
.match-preview {
    animation: slideIn 0.3s ease-out;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .actions-sidebar,
    .match-actions,
    .quick-action {
        display: none !important;
    }
}
