/* Modern Electricity Bill Checker Styles */

/* CSS Reset & Base */
* {
    box-sizing: border-box;
}

.ebc-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

/* Main Container */
.ebc-container {
    max-width: 1200px;
    margin: 0 auto;
   /* padding: 1rem; */
 /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    border-radius: 24px;
   /* box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15); */
    position: relative;
    overflow: hidden;
}

.ebc-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.ebc-container > * {
    position: relative;
    z-index: 1;
}

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

/* Header Section */
.ebc-header {
    text-align: center;
    margin-bottom: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ebc-header-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.ebc-header-icon svg {
    width: 32px;
    height: 32px;
}

.ebc-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e40af, #3730a3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.025em;
}

.ebc-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

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

/* Search Section */
.ebc-search-section {
    margin-bottom: 2rem;
}

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

.ebc-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 0.5rem;
    /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); */
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.ebc-input-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.ebc-input-icon {
    width: 20px;
    height: 20px;
    color: #6b7280;
    margin-left: 1rem;
    flex-shrink: 0;
}

.ebc-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    background: transparent;
    font-size: 1.125rem;
    font-weight: 500;
    outline: none;
    color: #1f2937;
}

.ebc-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.ebc-submit-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.ebc-submit-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.ebc-submit-btn svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 640px) {
    .ebc-input-wrapper {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .ebc-input-icon {
        display: none;
    }
    
    .ebc-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Alert Messages */
.ebc-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInFromTop 0.5s ease-out;
}

.ebc-alert-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.1));
    border-left: 4px solid #22c55e;
    color: #15803d;
}

.ebc-alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    border-left: 4px solid #ef4444;
    color: #dc2626;
}

.ebc-alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    border-left: 4px solid #f59e0b;
    color: #d97706;
}

.ebc-alert-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.ebc-alert h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.ebc-alert p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

/* Results Container */
.ebc-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

/* Summary Cards Grid */
.ebc-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Card Base */
.ebc-card {
   /* background: rgba(255, 255, 255, 0.95); */
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1rem;
   /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); */
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.ebc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.15);
}

.ebc-card-full {
    grid-column: 1 / -1;
}

/* Card Headers */
.ebc-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ebc-card-header-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.ebc-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.ebc-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    flex-shrink: 0;
}

.ebc-section-icon svg,
.ebc-card-icon svg {
    width: 20px;
    height: 20px;
}

.ebc-card-header h2,
.ebc-card-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.ebc-card-header p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* Card Types */
.ebc-card-primary .ebc-card-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.ebc-card-warning .ebc-card-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.ebc-card-info .ebc-card-icon {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
}

/* Card Values */
.ebc-card-value {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 12px;
}

.ebc-value-primary {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.ebc-value-warning {
    background: linear-gradient(135deg, #fef3c7, #fde047);
    color: #92400e;
}

.ebc-value-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

/* Two Column Layout */
.ebc-two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .ebc-two-column {
        grid-template-columns: 1fr 1fr;
    }
}

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

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

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

.ebc-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.ebc-info-item:hover {
   /* background: linear-gradient(135deg, #f0f9ff, #e0f2fe); */
    border-color: #0ea5e9;
}

.ebc-info-item-full {
    grid-column: 1 / -1;
}

.ebc-info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ebc-info-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    word-break: break-word;
}

.ebc-due-date {
    color: #dc2626;
    font-weight: 700;
}

/* Meter Stats */
.ebc-meter-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ebc-stat {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.ebc-stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    flex: 1;
}

.ebc-stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.ebc-status-badge {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* Usage Comparison */
.ebc-usage-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 16px;
    border: 1px solid #0ea5e9;
}

.ebc-reading {
    text-align: center;
    flex: 1;
}

.ebc-reading-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.ebc-reading-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0c4a6e;
    margin-bottom: 0.25rem;
}

.ebc-reading-unit {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.ebc-usage-arrow {
    font-size: 1.5rem;
    color: #0ea5e9;
    font-weight: 800;
    margin: 0 0.5rem;
}

.ebc-consumption-highlight {
    text-align: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, #1e40af, #3730a3);
    color: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
}

.ebc-consumption-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ebc-consumption-value {
    font-size: 2rem;
    font-weight: 800;
}

@media (max-width: 640px) {
    .ebc-usage-comparison {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .ebc-usage-arrow {
        transform: rotate(90deg);
    }
}

/* Charges Breakdown */
.ebc-charges-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .ebc-charges-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ebc-charge-category {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.ebc-charge-category h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.ebc-charge-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ebc-charge-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.ebc-charge-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ebc-charge-item span:first-child {
    font-weight: 500;
    color: #374151;
}

.ebc-charge-item span:last-child {
    font-weight: 700;
    color: #1e293b;
}

/* Total Summary */
.ebc-total-summary {
    background: linear-gradient(135deg, #1e293b, #374151);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 8px 25px rgba(30, 41, 59, 0.3);
}

.ebc-total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ebc-total-item:last-child {
    border-bottom: none;
}

.ebc-final-total {
    background: linear-gradient(135deg, #059669, #047857);
    margin: 1rem -1.5rem -1.5rem;
    padding: 1.25rem 1.5rem !important;
    border-radius: 0 0 16px 16px;
    font-size: 1.125rem;
    font-weight: 700;
}

.ebc-total-amount {
    color: #10b981;
    font-weight: 700;
    font-size: 1.125rem;
}

.ebc-surcharge-amount {
    color: #f59e0b;
    font-weight: 700;
    font-size: 1.125rem;
}

.ebc-final-amount {
    font-size: 1.5rem;
    font-weight: 800;
}

/* Table Styles */
.ebc-table-container {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ebc-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.ebc-table thead {
    background: linear-gradient(135deg, #1e40af, #3730a3);
    color: white;
}

.ebc-table th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ebc-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    font-weight: 500;
}

.ebc-table tbody tr {
    transition: background-color 0.3s ease;
}

.ebc-table tbody tr:hover {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

.ebc-table tbody tr:last-child td {
    border-bottom: none;
}

.ebc-month-cell {
    font-weight: 600;
    color: #1e293b;
}

.ebc-units-cell {
    color: #0ea5e9;
    font-weight: 600;
}

.ebc-payment-cell {
    color: #059669;
    font-weight: 700;
}

.ebc-status-cell {
    text-align: center;
}

.ebc-payment-status {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ebc-status-paid {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.ebc-status-pending {
    background: linear-gradient(135deg, #f45858, #ff2a00);
    color: #ffffff;
}

/* Animations */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .ebc-container {
      /*  margin: 0.5rem; */
       /* padding: 1rem; */
        border-radius: 20px;
    }
    
    .ebc-header {
        padding: 1.5rem;
    }
    
    .ebc-card {
        padding: 0.5rem; 
    }
    
    .ebc-card-value {
        font-size: 1.75rem;
    }
    
    .ebc-summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ebc-info-grid {
        grid-template-columns: 1fr;
    }
    
    .ebc-charges-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ebc-table th,
    .ebc-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .ebc-card-header h2 {
        font-size: 1.25rem;
    }
}

/* Loading State */
.ebc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    margin-top: 1.5rem;
}

.ebc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
.ebc-input:focus,
.ebc-submit-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .ebc-container {
        background: white;
        box-shadow: none;
        border-radius: 0;
    }
    
    .ebc-search-section {
        display: none;
    }
    
    .ebc-card {
        background: white;
        box-shadow: none;
        border: 1px solid #e2e8f0;
        break-inside: avoid;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .ebc-wrapper {
        color: #f1f5f9;
    }
    
    .ebc-container {
       /* background: linear-gradient(135deg, #1e293b 0%, #374151 100%); */
    }
    
    .ebc-card {
       /* background: rgba(30, 41, 59, 0.95); */
        border-color: rgba(71, 85, 105, 0.3);
    }
    
    .ebc-info-item {
        background: linear-gradient(135deg, #374151, #4b5563);
        border-color: #6b7280;
        color: #f1f5f9;
    }
    
    .ebc-info-value {
        color: #f1f5f9;
    }
}