/* Ultimate Rainwater Harvesting & Collection Calculator - WordPress Plugin Styles */

/* Container */
.rwc-container {
    max-width: 900px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

.rwc-container * {
    box-sizing: border-box;
}

/* Header */
.rwc-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #2980b9, #3498db);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.3);
}

.rwc-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.rwc-icon {
    font-size: 2rem;
}

.rwc-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rwc-description {
    font-size: 1rem;
    margin: 0;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Tabs */
.rwc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.rwc-tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    border: none;
    background: white;
    color: #555;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.rwc-tab-btn:hover {
    background: #f0f0f0;
    color: #2980b9;
}

.rwc-tab-btn.active {
    background: linear-gradient(135deg, #2980b9, #3498db);
    color: white;
    border-color: #2980b9;
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.3);
}

/* Cards */
.rwc-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rwc-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2980b9;
    margin: 0 0 8px 0;
}

.rwc-card-desc {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 0.95rem;
}

/* Input Grid */
.rwc-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.rwc-input-group {
    display: flex;
    flex-direction: column;
}

.rwc-input-group label {
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.rwc-input-group input,
.rwc-input-group select {
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.rwc-input-group input:focus,
.rwc-input-group select:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
}

.rwc-input-with-unit {
    display: flex;
    gap: 8px;
}

.rwc-input-with-unit input {
    flex: 2;
}

.rwc-input-with-unit select {
    flex: 1;
    min-width: 80px;
}

/* Calculated Values */
.rwc-calculated-values {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
}

.rwc-calc-item {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 8px;
    border: 1px solid #d0e3f7;
}

.rwc-calc-label {
    font-size: 0.85rem;
    color: #666;
    display: block;
    margin-bottom: 4px;
}

.rwc-calc-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2980b9;
}

/* Result Boxes */
.rwc-result-box {
    text-align: center;
    padding: 24px;
    border-radius: 10px;
    margin-top: 24px;
}

.rwc-result-runoff {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.rwc-result-annual {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: white;
    flex: 1;
    min-width: 200px;
}

.rwc-result-barrel {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: white;
    flex: 1;
}

.rwc-result-tank {
    background: linear-gradient(135deg, #2980b9, #3498db);
    color: white;
    flex: 1;
}

.rwc-result-storage {
    background: linear-gradient(135deg, #16a085, #1abc9c);
    color: white;
}

.rwc-result-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.rwc-result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rwc-result-value {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rwc-result-secondary {
    font-size: 1rem;
    opacity: 0.85;
    margin-top: 4px;
}

.rwc-result-note {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 8px;
}

/* Info Box */
.rwc-info-box {
    margin-top: 20px;
    padding: 14px;
    background: #f0f7ff;
    border-radius: 8px;
    border-left: 4px solid #2980b9;
    font-size: 0.9rem;
}

/* Harvesting Info */
.rwc-harvesting-info,
.rwc-tank-info {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rwc-info-item {
    display: flex;
    gap: 8px;
}

.rwc-info-label {
    color: #666;
}

.rwc-info-value {
    font-weight: 600;
    color: #2980b9;
}

/* Monthly Grid */
.rwc-monthly-grid {
    margin-bottom: 24px;
}

.rwc-monthly-row {
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.rwc-monthly-header {
    font-weight: 600;
    color: #444;
    background: #f8f9fa;
    padding: 12px 10px;
    border-radius: 8px;
    border-bottom: none;
    margin-bottom: 8px;
}

.rwc-monthly-input {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}

.rwc-monthly-input:focus {
    outline: none;
    border-color: #2980b9;
}

.rwc-monthly-result {
    font-weight: 600;
    color: #27ae60;
    text-align: right;
}

/* Harvest Results */
.rwc-harvest-results,
.rwc-tank-results {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Storage Status */
.rwc-storage-status {
    margin-top: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.rwc-storage-status h4 {
    margin: 0 0 16px 0;
    color: #2980b9;
}

.rwc-storage-grid,
.rwc-comparison-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rwc-storage-item,
.rwc-comparison-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.rwc-storage-status-item,
.rwc-comparison-balance {
    background: #f0f7ff;
    padding: 12px;
    border-radius: 8px;
    border-bottom: none;
}

.rwc-status-surplus,
.rwc-balance-surplus {
    color: #27ae60;
    font-weight: 600;
}

.rwc-status-shortage,
.rwc-balance-deficit {
    color: #e74c3c;
    font-weight: 600;
}

/* Tank Guide */
.rwc-tank-guide {
    margin-top: 24px;
    padding: 20px;
    background: #f0f7ff;
    border-radius: 10px;
}

.rwc-tank-guide h4 {
    margin: 0 0 12px 0;
    color: #2980b9;
}

.rwc-tank-guide ul {
    margin: 0;
    padding-left: 20px;
}

.rwc-tank-guide li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* Usage Presets */
.rwc-usage-presets {
    margin-top: 20px;
}

.rwc-usage-presets h4 {
    margin: 0 0 12px 0;
    color: #555;
    font-size: 0.95rem;
}

.rwc-preset-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rwc-preset-btn {
    padding: 10px 16px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rwc-preset-btn:hover {
    border-color: #2980b9;
    color: #2980b9;
    background: #f0f7ff;
}

/* Storage Comparison */
.rwc-storage-comparison {
    margin-top: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.rwc-storage-comparison h4 {
    margin: 0 0 16px 0;
    color: #2980b9;
}

.rwc-comparison-label {
    color: #666;
}

.rwc-comparison-value {
    font-weight: 600;
    color: #333;
}

/* Tab Panes */
.rwc-tab-pane {
    display: none;
}

.rwc-tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Summary */
.rwc-summary {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

.rwc-summary .rwc-card-title {
    color: white;
}

.rwc-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.rwc-summary-item {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.rwc-summary-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.rwc-summary-label {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.rwc-summary-value {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Footer */
.rwc-footer {
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 20px;
}

.rwc-footer-text {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.rwc-footer-text strong {
    color: #2980b9;
}

/* Responsive */
@media (max-width: 768px) {
    .rwc-container {
        margin: 10px;
    }

    .rwc-header {
        padding: 20px 15px;
    }

    .rwc-title {
        font-size: 1.5rem;
    }

    .rwc-tabs {
        flex-direction: column;
    }

    .rwc-tab-btn {
        min-width: auto;
    }

    .rwc-card {
        padding: 16px;
    }

    .rwc-input-grid {
        grid-template-columns: 1fr;
    }

    .rwc-result-value {
        font-size: 1.6rem;
    }

    .rwc-monthly-row {
        grid-template-columns: 80px 1fr 80px;
        gap: 10px;
    }

    .rwc-harvest-results,
    .rwc-tank-results {
        flex-direction: column;
    }

    .rwc-preset-btns {
        flex-direction: column;
    }

    .rwc-preset-btn {
        width: 100%;
    }

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

@media (max-width: 480px) {
    .rwc-title {
        font-size: 1.3rem;
    }

    .rwc-monthly-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 0;
    }

    .rwc-monthly-header {
        display: none;
    }

    .rwc-monthly-result {
        text-align: left;
    }

    .rwc-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .rwc-storage-item,
    .rwc-comparison-item {
        flex-direction: column;
        gap: 4px;
    }
}

/* Accessibility */
.rwc-input-group input:focus,
.rwc-input-group select:focus,
.rwc-tab-btn:focus,
.rwc-preset-btn:focus {
    outline: 2px solid #2980b9;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .rwc-container {
        max-width: none;
        margin: 0;
    }

    .rwc-tabs {
        display: none;
    }

    .rwc-tab-pane {
        display: block !important;
        page-break-inside: avoid;
    }

    .rwc-header,
    .rwc-summary {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}