/* 
 * Rajayog Muhurtham Module Styles
 * Updated with Purple Theme
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --mh-primary: #667eea;
    --mh-primary-dark: #764ba2;
    --mh-primary-light: rgba(102, 126, 234, 0.1);
    --mh-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --mh-success: #10b981;
    --mh-success-light: rgba(16, 185, 129, 0.1);
    --mh-warning: #f59e0b;
    --mh-danger: #ef4444;
    --mh-info: #3b82f6;
    --mh-radius: 12px;
    --mh-radius-lg: 16px;
    --mh-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    --mh-shadow-lg: 0 10px 30px rgba(102, 126, 234, 0.2);
}

/* ==========================================================================
   Page Header
   ========================================================================== */
.muhurtham-header {
    background: var(--mh-gradient);
    color: white;
    padding: 3rem 0 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.muhurtham-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M20 20.5V18H0v-2h20v-2l4 3.5-4 3.5z'/%3E%3C/g%3E%3C/svg%3E");
}

.muhurtham-header .container {
    position: relative;
    z-index: 1;
}

.muhurtham-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.muhurtham-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.muhurtham-header .btn-light {
    background: white;
    color: var(--mh-primary);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--mh-radius);
    transition: all 0.3s ease;
}

.muhurtham-header .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: #f8fafc;
    color: var(--mh-primary-dark);
}

/* ==========================================================================
   Info Card
   ========================================================================== */
.info-card {
    border: none;
    border-radius: var(--mh-radius-lg);
    overflow: hidden;
    box-shadow: var(--mh-shadow);
    background: white;
}

.info-card-header {
    background: var(--mh-gradient);
    color: white;
    padding: 1rem 1.5rem;
}

.info-card-header h5 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.info-card-body {
    padding: 1.5rem;
    background: white;
}

.info-card-body p {
    color: #64748b;
    line-height: 1.7;
}

.info-card-body ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.info-card-body li {
    margin-bottom: 0.5rem;
    color: #475569;
}

/* Warning & Guidelines variants */
.warning-card {
    border: 2px solid var(--mh-danger);
}

.warning-card .info-card-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.guidelines-card {
    border: 2px solid var(--mh-info);
}

.guidelines-card .info-card-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* ==========================================================================
   Query Cards (List View)
   ========================================================================== */
.query-card {
    border: none;
    border-radius: var(--mh-radius-lg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    background: white;
}

.query-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--mh-shadow-lg);
}

.query-card-header {
    background: var(--mh-gradient);
    color: white;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.query-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.query-card-title i {
    font-size: 1.25rem;
}

.query-card-body {
    padding: 1.5rem;
}

.query-info-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.query-info-item:last-of-type {
    border-bottom: none;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
}

.query-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--mh-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--mh-primary);
    flex-shrink: 0;
}

.query-info-content {
    flex: 1;
}

.query-info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 0.2rem;
}

.query-info-value {
    color: #1e293b;
    font-weight: 500;
}

.query-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.query-status-complete {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    color: #059669;
}

.query-status-pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
    color: #d97706;
}

.query-card .card-footer {
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    padding: 1rem 1.5rem;
}

.query-card .btn-success {
    background: var(--mh-gradient);
    border: none;
    border-radius: var(--mh-radius);
    font-weight: 600;
    padding: 0.65rem 1rem;
    transition: all 0.3s ease;
}

.query-card .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Empty State */
.query-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
    border-radius: var(--mh-radius-lg);
    border: 2px dashed #e2e8f0;
}

.query-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.query-empty-state h3 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.query-empty-state .btn-success {
    background: var(--mh-gradient);
    border: none;
    border-radius: var(--mh-radius);
    padding: 0.875rem 2rem;
    font-weight: 600;
}

.query-empty-state .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--mh-shadow);
}

/* ==========================================================================
   Event Types Grid
   ========================================================================== */
.event-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.event-type-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: var(--mh-radius);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
    color: #475569;
}

.event-type-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: var(--mh-primary);
    transform: translateY(-2px);
}

.event-type-icon {
    font-size: 1.5rem;
}

/* ==========================================================================
   Form Styling
   ========================================================================== */
.form-section {
    background: white;
    padding: 2rem;
    border-radius: var(--mh-radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--mh-shadow);
    border: 1px solid #f1f5f9;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.form-section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--mh-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

/* Usage Alert */
.usage-alert {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border: 2px solid var(--mh-primary);
    border-radius: var(--mh-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: start;
}

.usage-alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--mh-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.usage-alert-content {
    flex: 1;
}

.usage-alert-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--mh-primary-dark);
}

.usage-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.75rem 0;
}

.usage-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.usage-stat-icon {
    color: var(--mh-primary);
}

/* Subscriber Badge */
.subscriber-badge {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    border: 2px solid var(--mh-warning);
    border-radius: var(--mh-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: start;
}

.premium-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

/* ==========================================================================
   Time Slot Cards (Detail View)
   ========================================================================== */
.time-slot-card {
    border: none;
    border-radius: var(--mh-radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: all 0.3s ease;
    background: white;
}

.time-slot-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mh-shadow-lg);
}

.time-slot-header {
    background: var(--mh-gradient);
    color: white;
    padding: 1.25rem;
    font-weight: 600;
    font-size: 1rem;
}

.time-slot-body {
    padding: 1.5rem;
}

.time-display {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--mh-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-display i {
    -webkit-text-fill-color: var(--mh-primary);
}

/* Panchang Details */
.panchang-details {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    padding: 1rem;
    border-radius: var(--mh-radius);
    margin-bottom: 1rem;
}

.panchang-details h6 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--mh-primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panchang-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.panchang-item:last-child {
    border-bottom: none;
}

.panchang-icon {
    font-size: 1rem;
    color: var(--mh-primary);
    min-width: 20px;
}

.panchang-label {
    font-weight: 600;
    color: #64748b;
    min-width: 90px;
    font-size: 0.85rem;
}

.panchang-value {
    color: #1e293b;
    font-weight: 500;
}

/* Auspiciousness Score */
.score-section {
    margin: 1.5rem 0;
}

.score-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #475569;
    font-size: 0.9rem;
}

.score-bar {
    height: 36px;
    border-radius: 50px;
    background: #f1f5f9;
    overflow: hidden;
    position: relative;
}

.score-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    transition: width 0.6s ease;
    border-radius: 50px;
}

.score-excellent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.score-good {
    background: var(--mh-gradient);
}

.score-average {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.time-slot-note {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: var(--mh-primary-dark);
    padding: 0.875rem;
    border-radius: var(--mh-radius);
    font-size: 0.9rem;
    margin-top: 1rem;
    border-left: 4px solid var(--mh-primary);
}

/* ==========================================================================
   Query Details Card
   ========================================================================== */
.query-details-card {
    background: white;
    border: none;
    border-radius: var(--mh-radius-lg);
    overflow: hidden;
    box-shadow: var(--mh-shadow);
    margin-bottom: 2rem;
}

.query-details-header {
    background: var(--mh-gradient);
    color: white;
    padding: 1.5rem 2rem;
}

.query-details-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.query-details-body {
    padding: 2rem;
}

.detail-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--mh-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--mh-primary);
    flex-shrink: 0;
}

.detail-content strong {
    display: block;
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.detail-content span {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 500;
}

/* ==========================================================================
   Inauspicious Periods
   ========================================================================== */
.inauspicious-period {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.08));
    border-left: 4px solid var(--mh-danger);
    padding: 1rem;
    border-radius: var(--mh-radius);
    margin-bottom: 0.75rem;
}

.inauspicious-period-name {
    font-weight: 700;
    color: #b91c1c;
    margin-bottom: 0.25rem;
}

.inauspicious-period-desc {
    color: #991b1b;
    font-size: 0.9rem;
}

/* ==========================================================================
   No Results State
   ========================================================================== */
.no-results-card {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(217, 119, 6, 0.05));
    border: 2px solid var(--mh-warning);
    border-radius: var(--mh-radius-lg);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #78350f;
}

.no-results-text {
    color: #92400e;
    margin-bottom: 2rem;
}

.suggestions-box {
    background: white;
    border: 2px solid #fcd34d;
    border-radius: var(--mh-radius);
    padding: 1.5rem;
    display: inline-block;
    text-align: left;
}

/* ==========================================================================
   Action Buttons
   ========================================================================== */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.action-buttons .btn-primary {
    background: var(--mh-gradient);
    border: none;
    border-radius: var(--mh-radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

.action-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--mh-shadow);
}

.action-buttons .btn-outline-secondary {
    border-radius: var(--mh-radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

.copy-button {
    transition: all 0.3s ease;
}

.copy-button:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 991.98px) {
    .muhurtham-header {
        padding: 2rem 0 2rem;
    }
    
    .muhurtham-header h1 {
        font-size: 1.75rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .time-display {
        font-size: 1.25rem;
    }
    
    .usage-alert {
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .muhurtham-header h1 {
        font-size: 1.5rem;
    }
    
    .muhurtham-header .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .muhurtham-header .btn-light {
        width: 100%;
        margin-top: 1rem;
    }
    
    .usage-stats {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .event-types-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .subscriber-badge {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .muhurtham-header,
    .action-buttons,
    .copy-button,
    .usage-alert,
    .subscriber-badge {
        display: none !important;
    }
    
    .query-card,
    .time-slot-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.query-card,
.time-slot-card,
.info-card {
    animation: fadeInUp 0.4s ease-out;
}

.query-card:nth-child(1) { animation-delay: 0s; }
.query-card:nth-child(2) { animation-delay: 0.1s; }
.query-card:nth-child(3) { animation-delay: 0.2s; }
.query-card:nth-child(4) { animation-delay: 0.3s; }
.query-card:nth-child(5) { animation-delay: 0.4s; }
.query-card:nth-child(6) { animation-delay: 0.5s; }
