/* ====================================
   VELORA CALCULATOR FORMS
   Extracted from birth-chart.blade.php inline styles
   Extends base form system from forms-mobile.css and velora-unified-theme.css
   ==================================== */

/* ========================================
   CALCULATOR SECTION
   ======================================== */

.calculator-section {
    padding: 2rem 0;
    background: var(--velora-bg-secondary);
}

.calculator-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
    text-align: center;
    color: white;
}

/* ========================================
   CALCULATOR FORM
   ======================================== */

.calculator-form {
    display: grid;
    gap: 1.5rem;
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.calculator-form-card,
.chart-result-card {
    background: var(--velora-bg-card);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--velora-shadow-md);
    border: 1px solid var(--velora-border-primary);
}

/* ========================================
   FORM GRID
   Two-column layout on desktop, single on mobile
   ======================================== */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ========================================
   LOCATION SEARCH
   Autocomplete dropdown positioning
   ======================================== */

.location-search {
    position: relative;
    width: 100%;
}

.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--velora-bg-card);
    border: 2px solid var(--velora-border-primary);
    border-radius: 8px;
    margin-top: 0.25rem;
    z-index: 1000;
    box-shadow: var(--velora-shadow-md);
    max-height: 300px;
    overflow-y: auto;
}

.location-suggestion-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--velora-border-secondary);
    color: var(--velora-text-primary);
}

.location-suggestion-item:last-child {
    border-bottom: none;
}

.location-suggestion-item:hover,
.location-suggestion-item:focus {
    background: var(--velora-bg-hover);
    color: var(--velora-accent-primary);
    outline: none;
}

.location-suggestion-item i {
    margin-right: 0.5rem;
    color: var(--velora-accent-primary);
}

.location-highlight {
    color: var(--velora-accent-primary);
    font-weight: 600;
}

/* ========================================
   CHART PREVIEW
   ======================================== */

.preview-chart-card {
    background: var(--velora-bg-card);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--velora-border-primary);
    text-align: center;
}

.preview-chart-card h3 {
    color: var(--velora-text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.preview-chart-card .chart-wheel-container {
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.preview-text {
    color: var(--velora-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   CHART RESULT
   ======================================== */

.chart-result {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--velora-bg-card);
    border-radius: 20px;
    border: 1px solid var(--velora-border-primary);
}

.chart-info {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--velora-bg-secondary);
    border-radius: 10px;
}

.chart-meta {
    color: var(--velora-text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========================================
   CHART VISUALIZATION
   ======================================== */

.chart-visualization {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(147, 51, 234, 0.05));
    border-radius: 15px;
    border: 1px solid rgba(108, 99, 255, 0.1);
}

.chart-wheel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.birth-chart-wheel {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    aspect-ratio: 1 / 1;
}

/* ========================================
   CHART LEGEND
   ======================================== */

.chart-legend {
    background: var(--velora-bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid var(--velora-accent-primary);
}

.chart-legend h4 {
    color: var(--velora-accent-primary);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-item span {
    font-size: 0.9rem;
    color: var(--velora-text-primary);
    font-weight: 500;
}

/* ========================================
   CHART ACTIONS
   ======================================== */

.chart-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.chart-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--velora-accent-primary);
    color: #ffffff;
    border: 1px solid var(--velora-accent-primary);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 44px; /* WCAG touch target */
}

.chart-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.3);
}

.chart-action-btn.secondary {
    background: transparent;
    color: var(--velora-accent-primary);
    border: 2px solid var(--velora-accent-primary);
}

.chart-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   INFO SECTION
   ======================================== */

.info-section {
    margin-top: 4rem;
    padding: 2rem 0;
}

.info-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--velora-text-primary);
    font-size: 2rem;
}

/* ========================================
   INFO CARDS GRID
   ======================================== */

.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    text-align: center;
    padding: 2rem;
    background: var(--velora-bg-card);
    border-radius: 15px;
    border: 1px solid var(--velora-border-secondary);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--velora-shadow-lg);
    border-color: var(--velora-accent-primary);
}

.info-card i {
    font-size: 3rem;
    color: var(--velora-accent-primary);
    margin-bottom: 1rem;
}

/* ========================================
   POSITION GRID
   ======================================== */

.position-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.position-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--velora-bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--velora-border-secondary);
    transition: all 0.3s ease;
}

.position-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.position-item.highlight {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(147, 51, 234, 0.1));
    border-color: var(--velora-accent-primary);
}

.position-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    color: var(--velora-accent-primary);
}

/* ========================================
   HOUSES GRID
   ======================================== */

.houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.house-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--velora-bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--velora-border-secondary);
}

/* ========================================
   ASPECTS LIST
   ======================================== */

.aspects-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.aspect-item {
    padding: 1rem;
    background: var(--velora-bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--velora-accent-primary);
}

/* ========================================
   BIG THREE SECTION
   ======================================== */

.big-three {
    margin-bottom: 2rem;
}

.big-three h3 {
    color: var(--velora-accent-primary);
    margin-bottom: 1rem;
}

/* ========================================
   CHART SUMMARY
   ======================================== */

.chart-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ========================================
   CHART INTERPRETATION
   ======================================== */

.chart-interpretation {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--velora-bg-card);
    border-radius: 15px;
}

.interpretation-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--velora-text-secondary);
}

/* ========================================
   MOBILE RESPONSIVE BREAKPOINTS
   ======================================== */

@media (max-width: 768px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .calculator-form-card,
    .chart-result-card {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .birth-chart-wheel {
        width: 300px;
        height: 300px;
    }

    .legend-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .position-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .calculator-hero {
        padding: 60px 0;
    }

    .calculator-form-card,
    .chart-result-card {
        padding: 1.25rem;
    }

    .chart-visualization {
        padding: 1.5rem;
    }

    .chart-actions {
        flex-direction: column;
    }

    .chart-action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .calculator-hero {
        padding: 40px 0;
    }

    .calculator-form-card,
    .chart-result-card {
        padding: 1rem;
        border-radius: 15px;
    }

    .preview-chart-card {
        padding: 1.5rem;
    }

    .birth-chart-wheel {
        width: 250px;
        height: 250px;
    }

    .chart-legend {
        padding: 1rem;
    }

    .legend-items {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   DARK MODE OVERRIDES
   ======================================== */

[data-theme="dark"] .calculator-section {
    background: var(--velora-bg-secondary);
}

[data-theme="dark"] .chart-visualization {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(147, 51, 234, 0.1));
    border-color: rgba(108, 99, 255, 0.2);
}

[data-theme="dark"] .location-suggestions {
    background: var(--velora-bg-card);
    border-color: var(--velora-border-primary);
}

[data-theme="dark"] .location-suggestion-item:hover {
    background: var(--velora-bg-hover);
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .chart-visualization {
        background: white;
        border: 1px solid #ccc;
    }

    .chart-actions {
        display: none;
    }

    .birth-chart-wheel {
        filter: none;
    }
}

