/* ===== WATER CUT-OFF SCHEDULE PAGE ===== */

.water-cutoff-section {
    padding: 60px 0;
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

/* Search Form */
.search-form-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 6px 24px rgba(0, 137, 208, 0.15);
    margin-bottom: 30px;
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.search-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.search-form-wrapper:hover {
    box-shadow: 0 8px 32px rgba(0, 137, 208, 0.2);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.water-cutoff-form .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.water-cutoff-form .form-control,
.water-cutoff-form .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.water-cutoff-form .form-control:hover,
.water-cutoff-form .form-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 137, 208, 0.1);
}

.water-cutoff-form .form-control:focus,
.water-cutoff-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.3rem rgba(0, 137, 208, 0.2);
    outline: none;
    background-color: #f8fbff;
}

.water-cutoff-form .form-select {
    cursor: pointer;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.btn-view-schedule {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 137, 208, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-view-schedule:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003580 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 137, 208, 0.3);
    color: white;
}

.btn-view-schedule:active {
    transform: translateY(0);
}

/* Chart Section */
.chart-wrapper {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.chart-wrapper:hover {
    box-shadow: 0 6px 20px rgba(0, 137, 208, 0.15);
    transform: translateY(-2px);
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.chart-title i {
    font-size: 1.2rem;
}

.chart-wrapper canvas {
    max-height: 400px;
    min-height: 350px;
    flex: 1;
    width: 100% !important;
    height: auto !important;
}

/* Calendar Section */
.calendar-wrapper {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.calendar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.calendar-nav-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.calendar-nav-btn:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003580 100%);
    transform: scale(1.1);
}

.calendar-month-year {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    min-width: 200px;
    text-align: center;
}

.calendar-container {
    margin-bottom: 30px;
    overflow: visible;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    padding: 12px;
    font-size: 0.9rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: white;
    transition: all 0.3s ease;
    cursor: default;
}

.calendar-day.empty {
    border: none;
    background: transparent;
    cursor: default;
}

.calendar-day.today {
    border-color: var(--primary-color);
    background: rgba(0, 137, 208, 0.1);
}

.calendar-day.has-cutoff {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    cursor: pointer;
}

.calendar-day.has-cutoff:hover {
    background: rgba(220, 53, 69, 0.2);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.day-number {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.calendar-day.has-cutoff .day-number {
    color: #dc3545;
}

.cutoff-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid #e8e8e8;
}

.legend-normal {
    background: white;
}

.legend-cutoff {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
}

.calendar-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.calendar-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.calendar-details h5.details-date {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--primary-color);
}

.detail-header {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.detail-enterprise {
    font-weight: 600;
    color: var(--primary-color);
}

.detail-district {
    color: #666;
    font-size: 0.9rem;
}

.detail-body p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #333;
}

.detail-body strong {
    color: #666;
    margin-right: 5px;
}

.no-selection {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* Results Section */
.results-wrapper {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 20px;
}

.results-table-container {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.results-table thead {
    background: var(--gradient-primary);
    color: white;
}

.results-table thead th {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: left;
    white-space: nowrap;
    border: none;
}

.results-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
    font-size: 0.9rem;
    color: #333;
    vertical-align: middle;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.results-table tbody tr:hover {
    background-color: #f8f9fa;
}

.no-results {
    text-align: center;
    color: #dc3545;
    font-weight: 500;
    padding: 40px 20px !important;
    font-size: 1rem !important;
}

.no-results i {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .water-cutoff-section {
        padding: 40px 0;
    }

    .search-form-wrapper {
        padding: 30px 20px;
        margin-bottom: 20px;
    }
    
    .chart-wrapper {
        min-height: 400px;
    }
    
    .chart-wrapper canvas {
        max-height: 300px;
        min-height: 250px;
    }
    
    .calendar-wrapper {
        min-height: 400px;
    }

    .form-title {
        font-size: 1.3rem;
        margin-bottom: 25px;
    }

    .water-cutoff-form .form-label {
        font-size: 0.9rem;
    }

    .water-cutoff-form .form-control,
    .water-cutoff-form .form-select {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .btn-view-schedule {
        padding: 12px 30px;
        font-size: 1rem;
        width: 100%;
    }

    .results-table {
        font-size: 0.85rem;
    }

    .results-table thead th,
    .results-table tbody td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    .results-table thead th {
        font-size: 0.8rem;
    }

    .no-results {
        padding: 30px 15px !important;
        font-size: 0.9rem !important;
    }

    .results-wrapper {
        padding: 20px 15px;
    }

    .chart-wrapper {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .chart-title {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .chart-wrapper canvas {
        max-height: 250px;
    }

    .calendar-wrapper {
        padding: 20px 15px;
        margin-bottom: 30px;
    }

    .calendar-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .calendar-month-year {
        font-size: 1.1rem;
        min-width: 150px;
    }

    .calendar-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .calendar-grid {
        gap: 5px;
    }

    .calendar-day-header {
        padding: 8px 4px;
        font-size: 0.8rem;
    }

    .calendar-day {
        padding: 5px;
    }

    .day-number {
        font-size: 0.9rem;
    }

    .cutoff-indicator {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }

    .calendar-legend {
        flex-direction: column;
        gap: 15px;
    }

    .calendar-details {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .search-form-wrapper {
        padding: 25px 15px;
    }

    .form-title {
        font-size: 1.2rem;
    }

    .results-table-container {
        overflow-x: scroll;
    }

    .results-table {
        min-width: 800px;
    }
}

