/* NoticesMap.css - Styles consistent with 811 app theme */

/* Stats Cards */
.stat-card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--bs-box-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--bs-box-shadow);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bs-dark);
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--bs-grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

/* Map Section */
.map-section {
    border: none;
    border-radius: 8px;
    box-shadow: var(--bs-box-shadow-sm);
    overflow: hidden;
}

.map-section .card-header {
    background-color: white;
    border-bottom: 1px solid var(--bs-border-color);
    padding: 12px 20px;
}

.map-section .card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-dark);
}

#map {
    height: 450px;
    width: 100%;
    border-radius: 0 0 8px 8px;
}

.map-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--bs-grey);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.legend-dot.active {
    background: var(--bs-success);
}

.legend-dot.pending {
    background: var(--bs-warning);
}

.legend-dot.expiring {
    background: var(--bs-danger);
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--bs-box-shadow);
}

.leaflet-popup-content {
    margin: 0;
    min-width: 280px;
}

.popup-content {
    padding: 0;
}

.popup-header {
    background: var(--bs-primary);
    padding: 12px 16px;
    color: white;
}

.popup-header h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: white;
}

.popup-header .control-id {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 600;
}

.popup-body {
    padding: 12px 16px;
    background: white;
}

.popup-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--bs-border-color);
    font-size: 0.8rem;
}

.popup-row:last-child {
    border-bottom: none;
}

.popup-row .label {
    font-weight: 600;
    color: var(--bs-grey);
}

.popup-row .value {
    color: var(--bs-dark);
    text-align: right;
    max-width: 55%;
}

.popup-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.popup-status.active {
    background: rgba(96, 143, 62, 0.15);
    color: var(--bs-success);
}

.popup-status.pending {
    background: rgba(248, 208, 28, 0.25);
    color: #92400e;
}

.popup-status.expiring {
    background: rgba(228, 49, 38, 0.15);
    color: var(--bs-danger);
}

/* Filters Section */
.filters-section {
    border: none;
    border-radius: 8px;
    box-shadow: var(--bs-box-shadow-sm);
}

.filters-section .card-header {
    background-color: white;
    border-bottom: 1px solid var(--bs-border-color);
    padding: 12px 20px;
}

.filters-section .card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-dark);
}

.filters-section label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bs-grey);
    margin-bottom: 4px;
}

.filters-section .form-control,
.filters-section .form-select {
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    padding: 8px 12px;
}

.filters-section .form-control:focus,
.filters-section .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(82, 147, 65, 0.15);
}

/* Table Section */
.table-section {
    border: none;
    border-radius: 8px;
    box-shadow: var(--bs-box-shadow-sm);
}

.table-section .card-header {
    background-color: #B3D9A4;
    border-bottom: none;
    padding: 12px 20px;
}

.table-section .card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-dark);
}

#tblNoticesMap thead th {
    background-color: #B3D9A4;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bs-dark);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid var(--bs-primary);
    white-space: nowrap;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
}

#tblNoticesMap thead th:hover {
    background-color: #a3c994;
}

#tblNoticesMap tbody td {
    padding: 12px 14px;
    font-size: 0.85rem;
    color: var(--bs-dark);
    vertical-align: middle;
    border-bottom: 1px solid var(--bs-border-color);
}

#tblNoticesMap tbody tr {
    transition: background-color 0.2s;
    cursor: pointer;
}

#tblNoticesMap tbody tr:hover {
    background-color: #E6F2E1;
}

/* Status Badges - App Standard Colors */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(96, 143, 62, 0.15);
    color: var(--bs-success);
}

.status-badge.pending {
    background: rgba(248, 208, 28, 0.25);
    color: #92400e;
}

.status-badge.expiring {
    background: rgba(228, 49, 38, 0.15);
    color: var(--bs-danger);
}

/* Pagination - App Standard */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 16px 20px;
    background: var(--bs-light);
    border-top: 1px solid var(--bs-border-color);
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--bs-grey);
}

.pagination-controls {
    display: flex;
    gap: 6px;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid var(--bs-border-color);
    background: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--bs-dark);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: rgba(82, 147, 65, 0.05);
}

.pagination-btn.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bs-grey);
}

.empty-state i {
    font-size: 3rem;
    color: var(--bs-light-secondary);
    margin-bottom: 1rem;
}

.empty-state h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--bs-dark);
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--bs-grey);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    #map {
        height: 300px;
    }

    .map-legend {
        justify-content: center;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .pagination-wrapper {
        flex-direction: column;
        text-align: center;
    }
}

/* View Button */
.btn-view {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--bs-primary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.25s ease;
}

.btn-view:hover {
    transform: scale(1.3);
}

/* Table Info */
.table-info {
    font-size: 0.85rem;
    color: var(--bs-grey);
}
