/**
 * Budget Planner 2026 - WordPress Plugin
 * Stylesheet
 */

.budget-planner-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    background: #1a1f2e;
    color: #e5e7eb;
    border-radius: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.budget-planner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.budget-planner-tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #14b8a6;
    border-bottom-color: #14b8a6;
}

.tab-button.active {
    color: #14b8a6;
    border-bottom-color: #14b8a6;
}

.budget-planner-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-primary {
    background: #14b8a6;
    color: white;
}

.btn-primary:hover {
    background: #0d9488;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6366f1;
    color: white;
}

.btn-secondary:hover {
    background: #4f46e5;
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

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

.year-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.year-nav-btn {
    padding: 8px 16px;
    background: #374151;
    border: none;
    border-radius: 8px;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.year-nav-btn:hover:not(:disabled) {
    background: #4b5563;
    transform: translateY(-2px);
}

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

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.month-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #14b8a6;
    margin: 0;
}

.budget-sections {
    display: grid;
    gap: 30px;
}

.budget-section {
    background: #111827;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.section-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.budget-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.budget-table {
    width: 100%;
    border-collapse: collapse;
}

.budget-table thead th {
    background: #1f2937;
    color: #9ca3af;
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.budget-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #374151;
}

.budget-table tfoot {
    background: #1f2937;
}

.budget-table tfoot td {
    padding: 15px 12px;
    font-weight: 700;
    color: #14b8a6;
}

.budget-input {
    width: 100%;
    padding: 8px 12px;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 6px;
    color: #e5e7eb;
    font-size: 14px;
    transition: all 0.3s ease;
}

.budget-input:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.budget-input[type="checkbox"] {
    width: auto;
    height: 20px;
    cursor: pointer;
}

.total-row {
    background: #0f172a !important;
}

.total-amount {
    font-size: 16px;
    color: #10b981 !important;
}

.budget-summary {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

.budget-summary h3 {
    font-size: 20px;
    font-weight: 700;
    color: #14b8a6;
    margin: 0 0 20px 0;
}

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

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #1f2937;
    border-radius: 8px;
    font-size: 16px;
}

.summary-value {
    font-size: 20px;
    font-weight: 700;
}

.summary-value.positive {
    color: #10b981;
}

.summary-value.negative {
    color: #ef4444;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #374151;
    border-top-color: #14b8a6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    margin-top: 20px;
    color: #e5e7eb;
    font-size: 16px;
}

.budget-planner-login-required {
    padding: 40px;
    text-align: center;
    background: #1a1f2e;
    border-radius: 12px;
    color: #e5e7eb;
}

.budget-planner-login-required p {
    margin-bottom: 20px;
    font-size: 16px;
}

.budget-planner-login-required .button {
    display: inline-block;
    padding: 12px 24px;
    background: #14b8a6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.budget-planner-login-required .button:hover {
    background: #0d9488;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .budget-planner-header {
        flex-direction: column;
    }
    
    .budget-planner-tabs {
        width: 100%;
        overflow-x: auto;
    }
    
    .tab-button {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .budget-table {
        font-size: 12px;
    }
    
    .budget-input {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}
