/**
 * Solar Calculator WP - Public Styles
 *
 * @package SolarCalculatorWP
 */

.sc-container {
    max-width: 750px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.sc-container *,
.sc-container *::before,
.sc-container *::after {
    box-sizing: border-box;
}

.sc-title {
    font-size: 1.6em;
    margin: 0 0 20px;
    color: #2c3e50;
    font-weight: 600;
}

.sc-field-group {
    margin-bottom: 18px;
}

.sc-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #34495e;
    font-size: 0.95em;
}

.sc-address-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.sc-address-input:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
}

.sc-number-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.sc-number-input:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
}

.sc-number-input.sc-small {
    width: 80px;
    padding: 6px 10px;
    font-size: 14px;
}

.sc-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sc-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.sc-checkbox-label {
    cursor: pointer;
    color: #34495e;
    font-size: 0.95em;
}

.sc-map-container {
    display: none;
    height: 400px;
    width: 100%;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin: 15px 0;
    overflow: hidden;
}

.sc-map-container.visible {
    display: block;
}

.sc-draw-controls {
    margin-bottom: 12px;
}

.sc-btn {
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 8px;
}

.sc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sc-btn-draw {
    background: #fff;
    color: #34495e;
    border: 2px solid #bdc3c7;
}

.sc-btn-draw:hover:not(:disabled) {
    background: #ecf0f1;
    border-color: #95a5a6;
}

.sc-btn-primary {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
}

.sc-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #219a52, #27ae60);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.sc-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.sc-btn-secondary {
    background: #ffffff;
    color: #2c3e50;
    border: 2px solid #bdc3c7;
}

.sc-btn-secondary:hover:not(:disabled) {
    background: #f4f6f7;
    border-color: #95a5a6;
}

.sc-area-display {
    margin: 12px 0;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.05em;
}

.sc-area-tools {
    margin: 10px 0 14px;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e6edf3;
    border-radius: 8px;
}

.sc-manual-area-row {
    margin-top: 8px;
}

.sc-manual-area-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.sc-text-input {
    flex: 1;
    min-width: 180px;
    padding: 10px 12px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.sc-select-input {
    min-width: 130px;
    padding: 10px 12px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.sc-select-input:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
}

.sc-text-input:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
}

.sc-areas-list {
    margin-top: 10px;
}

.sc-area-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e3e8ee;
    border-radius: 6px;
    background: #fff;
    margin-bottom: 6px;
    font-size: 14px;
}

.sc-area-item strong {
    color: #2c3e50;
}

.sc-area-remove {
    border: 1px solid #d0d7de;
    background: #fff;
    color: #7a2e2e;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
}

.sc-loading {
    display: none;
    text-align: center;
    padding: 30px;
}

.sc-loading.visible {
    display: block;
}

.sc-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #27ae60;
    border-radius: 50%;
    animation: sc-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes sc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sc-loading-text {
    color: #7f8c8d;
    font-size: 0.95em;
}

.sc-error {
    display: none;
    padding: 14px 18px;
    background: #fdf2f2;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.95em;
}

.sc-error.visible {
    display: block;
}

.sc-notice {
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 8px;
}

.sc-notice-warning {
    background: #fef9e7;
    border-left: 4px solid #f39c12;
    color: #9a7b0a;
}

.sc-results-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.sc-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.sc-results-table th,
.sc-results-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.sc-results-table th {
    color: #7f8c8d;
    font-weight: 500;
    font-size: 0.9em;
    width: 50%;
}

.sc-results-table td {
    font-weight: 600;
    color: #2c3e50;
}

.sc-disclaimer {
    font-size: 0.85em;
    color: #95a5a6;
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    line-height: 1.5;
}

.sc-chart-title {
    margin: 20px 0 12px;
    font-size: 1.1em;
    color: #2c3e50;
    font-weight: 600;
}

.sc-chart-container {
    display: none;
    height: 280px;
    width: 100%;
    margin-top: 15px;
}

.sc-chart-container.visible {
    display: block;
}

.sc-print-actions {
    margin-top: 14px;
    text-align: right;
}

/* Responsive */
@media (max-width: 600px) {
    .sc-container {
        padding: 18px;
        border-radius: 0;
    }

    .sc-title {
        font-size: 1.35em;
    }

    .sc-map-container {
        height: 300px;
    }

    .sc-btn {
        width: calc(50% - 5px);
        margin-right: 0;
    }

    .sc-draw-controls {
        display: flex;
        gap: 10px;
    }

    .sc-btn-draw {
        flex: 1;
    }

    .sc-results-table th,
    .sc-results-table td {
        padding: 10px 6px;
        font-size: 0.9em;
    }
}

/* Print styles */
@media print {
    .sc-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .sc-btn,
    .sc-draw-controls {
        display: none !important;
    }

    .sc-map-container {
        height: 250px;
    }

    .sc-chart-container {
        page-break-inside: avoid;
    }
}
