/* Electricity Bill Checker Professional Styles */

/* Base Styles */
.ebc-container {
    max-width: 1024px;
    margin: 2rem auto;
    padding: 1rem;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .ebc-container {
        padding: 2rem;
    }
}

/* Title */
.ebc-title {
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
    color: #1e40af;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 640px) {
    .ebc-title {
        font-size: 1.75rem;
    }
}

/* Form */
.ebc-form {
    max-width: 600px;
    margin: 0 auto;
}

.ebc-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Balanced gap between input and button */
    align-items: center;
}

@media (min-width: 768px) {
    .ebc-form-group {
        flex-direction: row;
        gap: 1rem;
    }
}

.ebc-input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #ffffff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.ebc-input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.2);
}

.ebc-button {
    padding: 0.75rem 2rem;
    background-color: #1e40af;
    color: #ffffff;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.2s;
    cursor: pointer;
}

.ebc-button:hover {
    background-color: #1e3a8a;
    transform: translateY(-1px);
}

.ebc-duplicate-bill {
    text-align: center;
    padding: 1rem;
}

@media (max-width: 640px) {
    .ebc-button {
        width: 100%;
    }
}

/* Error Message */
.ebc-error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    padding: 1.25rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    text-align: center;
    border: 1px solid #ef4444;
}

.ebc-error-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #b91c1c;
}

/* Results */
.ebc-results {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Section */
.ebc-section {
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ebc-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.ebc-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* Section-Specific Backgrounds */
.ebc-section-billing {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.ebc-section-basic {
    background: linear-gradient(135deg, #f9fafb, #e5e7eb);
}

.ebc-section-meter {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.ebc-section-charges {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
}

.ebc-section-history {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

/* Grid Layout */
.ebc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .ebc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ebc-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Info Boxes */
.ebc-info-box {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.ebc-info-box-green {
    background: linear-gradient(135deg, #86efac, #4ade80);
    color: #14532d;
}

.ebc-info-box-red {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: #7f1d1d;
}

.ebc-info-box-yellow {
    background: linear-gradient(135deg, #fef08a, #facc15);
    color: #713f12;
}

.ebc-info-box-blue {
    background: linear-gradient(135deg, #93c5fd, #3b82f6);
    color: #1e3a8a;
}

.ebc-info-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ebc-info-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

/* Labels and Values */
.ebc-label {
    font-weight: 600;
    color: #1f2937;
    display: inline-block;
    min-width: 140px;
}

.ebc-grid p {
    font-size: 1rem;
    color: #1f2937;
    margin: 0.5rem 0;
}

/* Table */
.ebc-table-wrapper {
    overflow-x: auto;
}

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

.ebc-table th,
.ebc-table td {
    padding: 0.75rem;
    text-align: left;
    font-size: 0.95rem;
}

.ebc-table th {
    background-color: #e5e7eb;
    font-weight: 600;
    color: #1e3a8a;
    text-transform: uppercase;
}

.ebc-table td {
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.ebc-table tbody tr:hover {
    background-color: #f1f5f9;
}

/* Animation */
.ebc-fade-in {
    animation: ebcFadeIn 0.5s ease-in;
}

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

/* Mobile Adjustments */
@media (max-width: 640px) {
    .ebc-section-title {
        font-size: 1.5rem;
    }

    .ebc-info-value {
        font-size: 1.25rem;
    }

    .ebc-grid p {
        font-size: 0.95rem;
    }

    .ebc-label {
        min-width: 120px;
    }
}