/**
 * Alert Pollen Widget Styles
 * Horizontal layout with pollen list on the right
 */

/* Card container */
.pw-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(83, 61, 183, 0.1);
    overflow: hidden;
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 20px auto;
    border: 1px solid rgba(83, 61, 183, 0.1);
    max-width: 800px;
}

/* Header */
.pw-header {
    background: linear-gradient(135deg, #533DB7 0%, #6B4FD1 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pw-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pw-title h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.pw-icon {
    font-size: 1.5rem;
}

.pw-date {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Body - horizontal layout */
.pw-body {
    display: flex;
    padding: 20px;
    gap: 24px;
}

/* Main section (left) */
.pw-main {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Level gauge */
.pw-level-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pw-level-gauge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 4px solid currentColor;
}

.pw-level-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.pw-level-max {
    font-size: 0.9rem;
    opacity: 0.6;
}

.pw-level-label {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Risk level colors */
.pw-risk-none {
    color: #4CAF50;
    border-color: #4CAF50;
}

.pw-risk-low {
    color: #8BC34A;
    border-color: #8BC34A;
}

.pw-risk-moderate {
    color: #FFC107;
    border-color: #FFC107;
}

.pw-risk-high {
    color: #FF9800;
    border-color: #FF9800;
}

.pw-risk-very-high {
    color: #f44336;
    border-color: #f44336;
}

/* Weather section */
.pw-weather {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pw-weather-temp {
    display: flex;
    flex-direction: column;
}

.pw-temp-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.pw-temp-desc {
    font-size: 0.85rem;
    color: #666;
}

.pw-weather-details {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    color: #555;
}

/* Recommendation */
.pw-recommendation {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pw-recommendation p {
    margin: 0;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
}

/* Pollens section (right) */
.pw-pollens {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pw-pollens h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #533DB7;
    padding-bottom: 8px;
}

.pw-pollens-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Individual pollen item */
.pw-pollen-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pw-pollen-name {
    min-width: 100px;
    font-size: 0.85rem;
    color: #444;
    white-space: nowrap;
}

.pw-pollen-bar-container {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.pw-pollen-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.pw-bar-low {
    background: linear-gradient(90deg, #8BC34A, #CDDC39);
}

.pw-bar-moderate {
    background: linear-gradient(90deg, #FFC107, #FF9800);
}

.pw-bar-high {
    background: linear-gradient(90deg, #FF9800, #f44336);
}

.pw-pollen-level {
    min-width: 40px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
}

.pw-no-pollen {
    text-align: center;
    color: #4CAF50;
    font-size: 0.9rem;
    padding: 20px;
}

/* Footer */
.pw-footer {
    background: rgba(83, 61, 183, 0.05);
    padding: 10px 20px;
    font-size: 0.8rem;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pw-footer a {
    color: #533DB7;
    text-decoration: none;
    font-weight: 600;
}

.pw-footer a:hover {
    text-decoration: underline;
}

/* Loading state */
.pw-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #666;
}

.pw-loader {
    width: 24px;
    height: 24px;
    border: 3px solid #e9ecef;
    border-top-color: #533DB7;
    border-radius: 50%;
    animation: pw-spin 0.8s linear infinite;
}

@keyframes pw-spin {
    to { transform: rotate(360deg); }
}

/* Error state */
.pw-error {
    padding: 30px;
    text-align: center;
    color: #f44336;
}

/* Responsive: stack vertically on small screens */
@media (max-width: 700px) {
    .pw-body {
        flex-direction: column;
    }

    .pw-pollens {
        max-width: none;
    }

    .pw-level-section {
        justify-content: center;
    }

    .pw-weather {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .pw-header {
        justify-content: center;
        text-align: center;
    }
}
