/*
 * ASEAN Notifications Plugin Styles
 * Responsive design with color coding for notification types
 */

/* Container Styles */
.asean-notifications-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
}

/* Latest Notification Styles */
.asean-latest-notification {
    margin-bottom: 30px;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.asean-latest-notification:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Notification Type Colors */
.notification-information {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #f57c00;
    color: #e65100;
}

.notification-alert {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #f44336;
    color: #c62828;
}

.notification-default {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-color: #757575;
    color: #424242;
}

/* Notification Header */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.notification-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: inherit;
}

.notification-type-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.notification-type-badge.notification-information {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.5);
    border-color: #f57c00;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.notification-type-badge.notification-information:hover {
    background: linear-gradient(135deg, #e65100 0%, #d84315 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 124, 0, 0.6);
}

.notification-type-badge.notification-alert {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.5);
    border-color: #f44336;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.notification-type-badge.notification-alert:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.6);
}

.notification-type-badge.notification-default {
    background: linear-gradient(135deg, #757575 0%, #616161 100%);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(117, 117, 117, 0.5);
    border-color: #757575;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.notification-type-badge.notification-default:hover {
    background: linear-gradient(135deg, #616161 0%, #424242 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(117, 117, 117, 0.5);
}

/* Notification Content */
.notification-subject {
    margin: 0 0 16px 0;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    color: inherit;
}

.notification-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 12px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.notification-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-meta i {
    font-size: 1.875rem;
    width: 16px;
    text-align: center;
    opacity: 0.8;
}

.notification-meta strong {
    color: inherit;
    font-weight: 600;
}

/* Data Table Styles */
.asean-notifications-table-container {
    margin-top: 30px;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.asean-notifications-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    font-size: 0.9rem;
}

.asean-notifications-table thead th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa !important;
    color: #495057 !important;
}

.asean-notifications-table tbody td {
    padding: 16px 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
    line-height: 1.5;
}

.asean-notifications-table tbody td:nth-child(2) {
    text-align: center;
    padding: 20px 12px;
}

.asean-notifications-table thead th:nth-child(2) {
    text-align: center;
}

.asean-notifications-table tbody tr {
    transition: background-color 0.2s ease;
}

.asean-notifications-table tbody tr:hover {
    background-color: #f8f9fa !important;
}

.subject-column {
    max-width: 300px;
    word-wrap: break-word;
    hyphens: auto;
}

.asean-notifications-table code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    color: #d63384;
    border: 1px solid #e9ecef;
}

.asean-notifications-table tbody td strong {
    color: #495057;
    font-weight: 600;
}

/* Hidden rows for pagination */
.hidden-row {
    display: none;
}

/* Pagination Styles */
.asean-table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 16px 0;
    border-top: 1px solid #dee2e6;
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-info {
    font-size: 0.9rem;
    color: #6c757d;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-btn, .page-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background-color: #ffffff;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn:hover:not(:disabled), .page-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

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

.page-btn.active {
    background-color: #007cba;
    border-color: #007cba;
    color: #ffffff;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
}

.pagination-dots {
    padding: 8px 4px;
    color: #6c757d;
}

/* No Data Message */
.asean-notifications-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .asean-latest-notification {
        padding: 16px;
        margin-bottom: 20px;
    }

    .notification-title {
        font-size: 1.25rem;
    }

    .notification-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .notification-meta {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .asean-notifications-table {
        font-size: 0.8rem;
    }

    .asean-notifications-table thead th,
    .asean-notifications-table tbody td {
        padding: 8px 6px;
    }

    .subject-column {
        max-width: 200px;
        font-size: 0.75rem;
    }

    .asean-table-pagination {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    .pagination-btn, .page-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .asean-latest-notification {
        padding: 12px;
        border-radius: 8px;
    }

    .notification-title {
        font-size: 1.1rem;
    }

    .notification-subject {
        font-size: 1rem;
    }

    .notification-meta {
        font-size: 0.8rem;
    }

    .asean-notifications-table {
        font-size: 0.75rem;
    }

    .asean-notifications-table thead th,
    .asean-notifications-table tbody td {
        padding: 6px 4px;
    }

    .subject-column {
        max-width: 150px;
    }

    .notification-type-badge {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    /* Stack table on very small screens */
    .table-responsive {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }

    .asean-notifications-table {
        min-width: 600px;
    }
}

/* Print Styles */
@media print {
    .asean-notifications-container {
        background: white !important;
        color: black !important;
    }

    .asean-latest-notification {
        border: 1px solid #000 !important;
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .asean-table-pagination {
        display: none !important;
    }

    .hidden-row {
        display: table-row !important;
    }

    .asean-notifications-table {
        border: 1px solid #000 !important;
    }

    .asean-notifications-table th,
    .asean-notifications-table td {
        border: 1px solid #000 !important;
    }
}

/* Accessibility Improvements */
.asean-notifications-container button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.asean-notifications-table tbody tr:focus-within {
    background-color: #e3f2fd !important;
}

/* Animation for loading states */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.asean-notifications-container {
    animation: fadeIn 0.5s ease;
}