/* ============================================
   AstroCronos - Estilos de Carta Natal
   ============================================ */

/* Estilos SVG de la carta */
.chart-circle {
    fill: none;
    stroke: #2d3436;
    stroke-width: 2;
}

.chart-zodiac {
    fill: none;
    stroke: #636e72;
    stroke-width: 1;
}

.chart-house {
    fill: none;
    stroke: #a29bfe;
    stroke-width: 1;
    opacity: 0.6;
}

.chart-aspect {
    fill: none;
    stroke-width: 1;
    opacity: 0.5;
}

.chart-aspect.conjunction {
    stroke: #d63031;
}

.chart-aspect.sextile {
    stroke: #00b894;
}

.chart-aspect.square {
    stroke: #fdcb6e;
}

.chart-aspect.trine {
    stroke: #0984e3;
}

.chart-aspect.opposition {
    stroke: #e17055;
}

.planet-symbol {
    font-size: 16px;
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: middle;
}

.planet-sun { fill: #f39c12; }
.planet-moon { fill: #ecf0f1; stroke: #2c3e50; stroke-width: 1; }
.planet-mercury { fill: #e74c3c; }
.planet-venus { fill: #27ae60; }
.planet-mars { fill: #c0392b; }
.planet-jupiter { fill: #f1c40f; }
.planet-saturn { fill: #95a5a6; }
.planet-uranus { fill: #3498db; }
.planet-neptune { fill: #9b59b6; }
.planet-pluto { fill: #34495e; }

.zodiac-label {
    font-size: 12px;
    font-weight: bold;
    text-anchor: middle;
}

.house-label {
    font-size: 11px;
    fill: #a29bfe;
    font-weight: 600;
}

.angle-label {
    font-size: 10px;
    fill: #6c5ce7;
    font-weight: bold;
}

/* Tooltip de la carta */
.chart-tooltip {
    position: absolute;
    background: rgba(45, 52, 54, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    max-width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.chart-tooltip .tooltip-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: #a29bfe;
}

.chart-tooltip .tooltip-value {
    margin: 2px 0;
}

/* Controles de la carta */
.chart-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.chart-control-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chart-control-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2d3436;
}

.chart-toggle {
    display: flex;
    gap: 0.5rem;
}

.chart-toggle button {
    padding: 0.4rem 0.8rem;
    border: 2px solid #dfe6e9;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.chart-toggle button:hover {
    border-color: #6c5ce7;
    color: #6c5ce7;
}

.chart-toggle button.active {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
}

/* Zoom controls */
.zoom-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.zoom-controls button {
    width: 32px;
    height: 32px;
    border: 2px solid #dfe6e9;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-controls button:hover {
    border-color: #6c5ce7;
    color: #6c5ce7;
}

.zoom-slider {
    width: 150px;
    height: 4px;
    border-radius: 2px;
    background: #dfe6e9;
    outline: none;
    -webkit-appearance: none;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #6c5ce7;
    cursor: pointer;
}

.zoom-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #6c5ce7;
    cursor: pointer;
    border: none;
}

/* Modo oscuro para la carta */
body.dark-mode .chart-circle {
    stroke: #ecf0f1;
}

body.dark-mode .chart-zodiac {
    stroke: #bdc3c7;
}

body.dark-mode .zodiac-label {
    fill: #ecf0f1;
}

body.dark-mode .chart-tooltip {
    background: rgba(236, 240, 241, 0.95);
    color: #2d3436;
}

body.dark-mode .chart-tooltip .tooltip-title {
    color: #6c5ce7;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-container {
    animation: fadeIn 0.3s ease;
}

.planet-symbol {
    transition: all 0.2s ease;
}

.planet-symbol:hover {
    filter: brightness(1.2);
    cursor: pointer;
}

/* Leyenda de aspectos */
.aspects-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f5f6fa;
    border-radius: 4px;
}

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

.legend-color {
    width: 20px;
    height: 2px;
    border-radius: 1px;
}

.legend-item span {
    font-size: 0.9rem;
    color: #2d3436;
}

/* Información de planetas */
.planet-info {
    background: white;
    border-left: 4px solid #6c5ce7;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.planet-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.planet-info-name {
    font-weight: 600;
    color: #2d3436;
    font-size: 1rem;
}

.planet-info-sign {
    background: #6c5ce7;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.planet-info-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #636e72;
}

.planet-info-detail {
    display: flex;
    justify-content: space-between;
}

.planet-info-label {
    font-weight: 600;
    color: #2d3436;
}

/* Exportación */
.export-options {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.export-options button {
    padding: 0.5rem 1rem;
    border: 2px solid #dfe6e9;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.export-options button:hover {
    border-color: #6c5ce7;
    color: #6c5ce7;
    background: #f5f6fa;
}

.export-options button.active {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
}

/* Responsive */
@media (max-width: 768px) {
    .chart-controls {
        flex-direction: column;
    }

    .chart-control-group {
        width: 100%;
    }

    .chart-toggle {
        width: 100%;
        flex-wrap: wrap;
    }

    .chart-toggle button {
        flex: 1;
        min-width: 80px;
    }

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

    .planet-info-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .planet-symbol {
        font-size: 12px;
    }

    .zodiac-label {
        font-size: 10px;
    }

    .chart-tooltip {
        font-size: 11px;
        padding: 6px 10px;
    }

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