/**
 * Announcements Styles
 * Praxis-Mitteilungen Modal und Bell
 */

/* ==========================================================================
   Bell Button
   ========================================================================== */

.announcement-bell {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 10px;
    animation: bellAttention 3s ease-in-out infinite;
}

.announcement-bell:hover {
    background: rgba(90, 115, 96, 0.1);
    animation: none;
}

.announcement-bell svg {
    width: 24px;
    height: 24px;
    color: #5a7360;
    transition: color 0.3s ease;
}

.announcement-bell:hover svg {
    color: #4a6350;
}

.announcement-bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: linear-gradient(135deg, #c9a55a 0%, #b8944a 100%);
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@keyframes bellAttention {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(10deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(6deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(2deg); }
    60%, 100% { transform: rotate(0deg); }
}

/* Bell in "read" state */
.announcement-bell.read {
    animation: none;
}

.announcement-bell.read svg {
    color: #8a9a8d;
}

.announcement-bell.read .announcement-bell-badge {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.announcement-bell.read:hover svg {
    color: #5a7360;
}

/* ==========================================================================
   Overlay
   ========================================================================== */

.announcement-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 55, 45, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.announcement-overlay.show {
    display: flex;
    opacity: 1;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.announcement-modal {
    position: relative;
    background: linear-gradient(145deg, #fdfcfa 0%, #f8f4ed 100%);
    border-radius: 20px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(90, 115, 96, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.announcement-overlay.show .announcement-modal {
    transform: scale(1) translateY(0);
}

/* Flora decoration */
.announcement-flora {
    position: absolute;
    width: 80px;
    height: 80px;
    color: #5a7360;
    opacity: 0.25;
    pointer-events: none;
}

.announcement-flora-tl {
    top: -10px;
    left: -10px;
}

.announcement-flora-br {
    bottom: -10px;
    right: -10px;
}

/* Close Button */
.announcement-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.announcement-close:hover {
    background: rgba(90, 115, 96, 0.1);
}

.announcement-close svg {
    width: 20px;
    height: 20px;
    color: #7a8a7d;
}

/* Header */
.announcement-header {
    background: linear-gradient(135deg, #5a7360 0%, #6d8a73 100%);
    padding: 28px 30px 24px;
    text-align: center;
    position: relative;
}

.announcement-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(201, 165, 90, 0.5), transparent);
}

.announcement-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    margin-bottom: 12px;
    animation: iconPulse 2s ease-in-out infinite;
}

.announcement-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px 10px rgba(255,255,255,0); }
}

.announcement-title {
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    font-weight: normal;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Content */
.announcement-content {
    padding: 25px 30px;
    max-height: 45vh;
    overflow-y: auto;
}

.announcement-item {
    position: relative;
}

.announcement-item-header {
    margin-bottom: 12px;
}

.announcement-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f5f2eb 0%, #ebe6db 100%);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #5a7360;
    font-weight: 500;
    border: 1px solid rgba(90, 115, 96, 0.15);
}

.announcement-type-icon {
    font-size: 1rem;
}

.announcement-item-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    color: #3d4a3f;
    margin: 0 0 10px 0;
    font-weight: normal;
}

.announcement-message {
    color: #4a5548;
    font-size: 0.95rem;
    line-height: 1.7;
}

.announcement-message p {
    margin: 0 0 12px;
}

.announcement-message p:last-child {
    margin-bottom: 0;
}

.announcement-message strong {
    color: #3d4a3f;
    font-weight: 600;
}

.announcement-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(90, 115, 96, 0.2), transparent);
    margin: 20px 0;
}

/* Type-specific Styles */
.announcement-type-warning .announcement-type-badge {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: rgba(255, 152, 0, 0.3);
    color: #e65100;
}

.announcement-type-illness .announcement-type-badge {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: rgba(255, 152, 0, 0.2);
    color: #ef6c00;
}

.announcement-type-vacation .announcement-type-badge {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: rgba(76, 175, 80, 0.2);
    color: #388e3c;
}

.announcement-type-holiday .announcement-type-badge {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-color: rgba(255, 193, 7, 0.3);
    color: #f9a825;
}

/* Footer */
.announcement-footer {
    padding: 20px 30px 25px;
    text-align: center;
    background: linear-gradient(to top, rgba(90, 115, 96, 0.03), transparent);
}

.announcement-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #5a7360 0%, #4a6350 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(90, 115, 96, 0.3);
}

.announcement-btn:hover {
    background: linear-gradient(135deg, #4a6350 0%, #3d5343 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 115, 96, 0.4);
}

.announcement-btn svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
    .announcement-modal {
        max-height: 90vh;
        border-radius: 16px;
    }

    .announcement-header {
        padding: 22px 24px 20px;
    }

    .announcement-icon {
        width: 48px;
        height: 48px;
    }

    .announcement-icon svg {
        width: 24px;
        height: 24px;
    }

    .announcement-title {
        font-size: 1.15rem;
    }

    .announcement-content {
        padding: 20px 24px;
    }

    .announcement-footer {
        padding: 16px 24px 22px;
    }

    .announcement-btn {
        width: 100%;
        justify-content: center;
    }

    .announcement-flora {
        opacity: 0.15;
    }
}
