/* DPC Alerts Provider Styles */

.ww-dpc-alerts-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #dee2e6;
}

.ww-dpc-alerts-header {
    text-align: center;
    margin-bottom: 20px;
}

.ww-dpc-alerts-title {
    font-size: 20px;
    font-weight: 500;
    color: #212529;
    margin-bottom: 10px;
}

.ww-dpc-alerts-subtitle {
    font-size: 14px;
    color: #6c757d;
}

.ww-dpc-alerts-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 16px;
}

.ww-dpc-alerts-location {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
}

/* No alerts state */
.ww-dpc-no-alerts {
    text-align: center;
    padding: 40px 20px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    margin: 20px 0;
}

.ww-dpc-no-alerts-icon {
    font-size: 48px;
    color: #155724;
    margin-bottom: 10px;
}

.ww-dpc-no-alerts-text {
    font-size: 18px;
    color: #155724;
    font-weight: 500;
}

/* Alert list */
.ww-dpc-alerts-list {
    margin: 20px 0;
}

.ww-dpc-alert-item {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: #fff;
    overflow: hidden;
}

/* Alert severity colors */
.ww-dpc-alert-green {
    border-color: #28a745;
    background-color: #d4edda;
}

.ww-dpc-alert-yellow {
    border-color: #ffc107;
    background-color: #fff3cd;
}

.ww-dpc-alert-orange {
    border-color: #fd7e14;
    background-color: #ffe5d0;
}

.ww-dpc-alert-red {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.ww-dpc-alert-default {
    border-color: #6c757d;
    background-color: #e2e3e5;
}

/* PDF Container */
.ww-dpc-pdf-container {
    margin: 20px 0 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.ww-dpc-pdf-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #212529;
    text-align: center;
}

.ww-dpc-pdf-info {
    text-align: center;
}

.ww-dpc-pdf-info p {
    margin-bottom: 15px;
    color: #495057;
}

.ww-dpc-pdf-download-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.ww-dpc-pdf-download-btn:hover {
    background-color: #0056b3;
    color: white;
}

.ww-dpc-pdf-download-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.ww-dpc-pdf-icon {
    font-size: 20px;
    vertical-align: middle;
}

.ww-dpc-pdf-embed-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.ww-dpc-pdf-embed-btn:hover {
    background-color: #0056b3;
    color: white;
    text-decoration: none;
}

.ww-dpc-pdf-embed-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* PDF Toolbar */
.ww-dpc-pdf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.ww-dpc-pdf-close-btn,
.ww-dpc-pdf-expand-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ww-dpc-pdf-close-btn {
    background-color: #dc3545;
    color: white;
}

.ww-dpc-pdf-close-btn:hover {
    background-color: #c82333;
}

.ww-dpc-pdf-expand-btn {
    background-color: #007bff;
    color: white;
}

.ww-dpc-pdf-expand-btn:hover {
    background-color: #0056b3;
}

/* PDF Loading */
.ww-dpc-pdf-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 16px;
}

/* Fullscreen mode */
.ww-dpc-pdf-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    z-index: 9999 !important;
    background-color: #ffffff !important;
    border-radius: 0 !important;
}

.ww-dpc-pdf-fullscreen #dpc-pdf-iframe {
    height: calc(100vh - 50px) !important;
}

.ww-dpc-pdf-fullscreen .ww-dpc-pdf-toolbar {
    position: sticky;
    top: 0;
    z-index: 10000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Alerts Content Section */
.ww-dpc-alerts-content {
    margin-top: 30px;
}

.ww-dpc-section-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #212529;
    text-align: center;
}

/* Actions */
.ww-dpc-alerts-actions {
    text-align: center;
    margin: 20px 0;
}

.ww-dpc-alerts-refresh {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ww-dpc-alerts-refresh:hover {
    background-color: #0056b3;
}

/* Alert header with date and precipitation */
.ww-dpc-alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.03);
}

.ww-dpc-alert-date {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

.ww-dpc-alert-precipitation {
    font-size: 14px;
    font-weight: 500;
    padding: 5px 15px;
    border-radius: 20px;
    color: white;
}

/* Precipitation severity colors */
.ww-dpc-precip-green {
    background-color: #28a745;
}

.ww-dpc-precip-yellow {
    background-color: #ffc107;
    color: #212529;
}

.ww-dpc-precip-orange {
    background-color: #fd7e14;
}

.ww-dpc-precip-red {
    background-color: #dc3545;
}

.ww-dpc-precip-default {
    background-color: #6c757d;
}

/* Time validity */
.ww-dpc-alert-validity {
    padding: 0 15px;
    margin-bottom: 10px;
}

.ww-dpc-time-period {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
}

/* Areas section */
.ww-dpc-alert-areas {
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.02);
}

.ww-dpc-areas-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #212529;
}

.ww-dpc-areas-list {
    font-size: 14px;
}

.ww-dpc-region-group {
    margin-bottom: 8px;
    line-height: 1.5;
}

.ww-dpc-region-group strong {
    color: #495057;
}

/* Alert content styles - removed CAP specific styles */
.ww-dpc-alert-description {
    font-size: 14px;
    color: #495057;
    margin-bottom: 10px;
    line-height: 1.5;
    padding: 0 15px;
}

.ww-dpc-alert-instruction {
    background-color: #e7f3ff;
    padding: 10px 15px;
    border-left: 4px solid #007bff;
    margin: 10px 15px;
    font-size: 14px;
}

/* Actions */
.ww-dpc-alerts-actions {
    text-align: center;
    margin: 20px 0;
}

.ww-dpc-alerts-refresh {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ww-dpc-alerts-refresh:hover {
    background-color: #0056b3;
}

/* Error state */
.ww-dpc-alerts-error {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
}

.ww-error-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.ww-error-message {
    font-size: 16px;
    color: #721c24;
}

/* Attribution */
.ww-dpc-alerts-attribution {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
    text-align: center;
    font-size: 12px;
    color: #6c757d;
}

.ww-dpc-alerts-attribution a {
    color: #007bff;
    text-decoration: none;
}

.ww-dpc-alerts-attribution a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ww-dpc-alert-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ww-dpc-alert-severity {
        margin-top: 5px;
    }
    
    .ww-dpc-alerts-title {
        font-size: 18px;
    }
}

/* Responsive adjustments for PDF */
@media (max-width: 768px) {
    #dpc-pdf-iframe {
        height: 400px;
    }
}

/* Maximize PDF width while keeping it centered */
.ww-dpc-alerts-section {
    max-width: 100%;
    width: 100%;
}

.ww-dpc-pdf-container {
    margin: 20px 0 30px;
    padding: 0;
    background-color: transparent;
}

.ww-dpc-pdf-info {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

#dpc-pdf-embed-wrapper {
    margin: 0;
    padding: 0;
    width: 100%;
}

.ww-dpc-pdf-embed-container {
    position: relative;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

#dpc-pdf-iframe {
    display: block;
    width: 100%;
    height: 800px;
    border: none;
    max-width: 100%;
}

/* Ensure the weather display container doesn't restrict width */
.ww-weather-display {
    max-width: 100%;
    width: 100%;
}

/* Override any parent container restrictions */
.ww-weather-display .ww-dpc-alerts-section {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Adjust height for better viewing */
@media (min-height: 900px) {
    #dpc-pdf-iframe {
        height: 900px;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    #dpc-pdf-iframe {
        height: 500px;
    }
    
    .ww-dpc-pdf-info {
        padding: 15px;
    }
}