/**
 * Meldingen Frontend Styles
 */

/* Modal wrapper */
.uit-holland-melding-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

/* Overlay */
.melding-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Modal content - day-card styling met hover effecten */
.melding-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 95%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    
    /* Day-card styling */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    text-align: center;
    
    /* Oranje accent balk bovenaan */
    position: relative;
    transition: all 0.3s ease;
}

.melding-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: #F29100;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

/* Hover effecten zoals day-cards */
.melding-modal-content:hover {
    transform: translate(-50%, -50%) translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #F29100;
}

.melding-modal-content:hover::before {
    transform: scaleX(1);
}

/* High priority modals - altijd zichtbare oranje balk */
.melding-modal-content.high-priority {
    border-color: #F29100;
    border-width: 2px;
    box-shadow: 0 6px 20px rgba(242, 145, 0, 0.2);
}

.melding-modal-content.high-priority::before {
    transform: scaleX(1);
    height: 6px;
}

.melding-modal-content.high-priority:hover {
    transform: translate(-50%, -50%) translateY(-2px);
}

/* Close button - hamburger menu styling */
.melding-modal-close {
    position: absolute;
    top: 0;
    right: 0;
    background: #F29100;
    border: none;
    width: 50px;
    height: 50px;
    border-bottom-left-radius: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(242, 145, 0, 0.3);
}

.melding-modal-close:hover {
    background: #d87e00;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(242, 145, 0, 0.4);
}

.melding-modal-close::before {
    content: '×';
    font-size: 24px;
    font-weight: 700;
    color: white;
    transition: color 0.3s ease;
}

.melding-modal-close:hover::before {
    color: white;
}

/* Mobile hamburger styling - size adjustments */
@media (max-width: 768px) {
    .melding-modal-close {
        width: 45px;
        height: 45px;
        border-bottom-left-radius: 1.2rem;
    }
    
    .melding-modal-close::before {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .melding-modal-close {
        width: 40px;
        height: 40px;
        border-bottom-left-radius: 1rem;
    }
    
    .melding-modal-close::before {
        font-size: 20px;
    }
}

/* Modal image header - bovenin als header */
.melding-modal-image-header {
    width: 100%;
    height: 360px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s ease;
}

.melding-modal-image-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Hover effect voor header afbeelding */
.melding-modal-content:hover .melding-modal-image-header {
    transform: scale(1.02);
}

.melding-modal-content:hover .melding-modal-image-header img {
    transform: scale(1.05);
}

/* Fallback voor geen afbeelding */
.melding-modal-image-header.no-image {
    height: auto;
    min-height: 120px;
    background: linear-gradient(90deg, #F29100 0%, #ff9500 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Witte titel styling in no-image header */
.melding-modal-image-header.no-image .melding-modal-title {
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Witte prioriteit badge in no-image header */
.melding-modal-image-header.no-image .melding-modal-priority-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Modal header - titel en badge onder afbeelding */
.melding-modal-header {
    padding: 2rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Modal title - hero-title styling */
.melding-modal-title {
    font-family: 'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif !important;
    font-size: 1.875rem;
    font-weight: 900;
    color: #3f3f3c;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    line-height: 1.1;
}

/* Priority badge - groter gemaakt */
.melding-modal-priority-badge {
    background: #F29100;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    display: inline-block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(242, 145, 0, 0.3);
}

/* Modal body - verruimde layout */
.melding-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    padding: 0 2.5rem 2.5rem;
    text-align: center;
    overflow-y: auto;
}

/* Modal message - website typography */
.melding-modal-message {
    font-family: 'Roboto', system-ui, sans-serif !important;
    font-size: 1.125rem;
    font-weight: 400;
    color: #1f2937;
    line-height: 1.6;
    margin: 1.5rem 0;
    text-align: center;
    max-width: 600px;
}

.melding-modal-message p {
    margin-bottom: 1rem;
}

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

/* High priority message styling */
.melding-modal-content.high-priority .melding-modal-message {
    color: #1f2937;
    font-weight: 500;
}

/* Divider Line - groter gemaakt */
.melding-modal-divider-line {
    width: 60px;
    height: 4px;
    background: #F29100;
    margin: 1.5rem auto;
    border-radius: 2px;
}

/* Modal dates - groter en prominenter */
.melding-modal-dates {
    font-size: 1rem;
    color: #666;
    margin: 1rem 0;
    text-align: center;
    background: #f8f9fa;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #F29100;
}

/* Modal Footer - vergrote versie van day-status-footer */
.melding-modal-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    min-height: 60px;
}

.melding-modal-footer.has-openingstijden-impact {
    background: #F29100;
    color: white;
    border-top: none;
}

.melding-modal-footer .status-icon {
    font-size: 1.2rem;
    vertical-align: middle;
}

.melding-modal-footer.has-openingstijden-impact .status-icon {
    color: white;
}

.melding-modal-footer .status-text {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    vertical-align: middle;
    line-height: 1.4;
}

/* Default footer styling */
.melding-modal-footer:not(.has-openingstijden-impact) {
    background: #f8f9fa;
    color: #666;
}

.melding-modal-footer:not(.has-openingstijden-impact) .status-icon {
    color: #28a745;
}

/* Oude openingstijden notice - nu verborgen, wordt vervangen door footer */
.melding-modal-openingstijden {
    display: none;
}

/* Animations */
.uit-holland-melding-modal.fade-in .melding-modal-overlay {
    animation: fadeIn 0.3s ease-out;
}

.uit-holland-melding-modal.fade-in .melding-modal-content {
    animation: fadeInScale 0.3s ease-out;
}

.uit-holland-melding-modal.slide-in .melding-modal-content {
    animation: slideIn 0.3s ease-out;
}

.uit-holland-melding-modal.zoom-in .melding-modal-content {
    animation: zoomIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Mobile swipe support */
.melding-modal-content.dragging {
    transition: none;
}

/* Opening hours calendar integration */
.opening-hours-melding {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.opening-hours-melding .melding-icon {
    font-size: 16px;
    vertical-align: middle;
}

.opening-hours-melding small {
    display: block;
    margin-top: 4px;
    opacity: 0.8;
}

/* Medium screens - tablet */
@media (min-width: 768px) {
    .melding-modal-title {
        font-size: 2.25rem;
    }
}

/* Large screens - extra grote titel */
@media (min-width: 1024px) {
    .melding-modal-title {
        font-size: 3rem;
    }
}

@media (min-width: 1280px) {
    .melding-modal-title {
        font-size: 3.75rem;
    }
}

@media (min-width: 1536px) {
    .melding-modal-title {
        font-size: 4.5rem;
    }
}

/* Mobile Responsiveness - vergrote modal blijft goed zichtbaar */
@media (max-width: 768px) {
    .melding-modal-content {
        width: 95%;
        max-width: 600px;
        max-height: 90vh;
    }
    
    .melding-modal-image-header {
        height: 280px;
    }
    
    .melding-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .melding-modal-title {
        font-size: 2.25rem;
    }
    
    .melding-modal-body {
        padding: 0 2rem 2rem;
    }
    
    .melding-modal-message {
        font-size: 1rem;
    }
    
    .melding-modal-dates {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    
    .melding-modal-footer {
        padding: 0.8rem 1.2rem;
        min-height: 50px;
    }
    
    .melding-modal-footer .status-text {
        font-size: 0.9rem;
    }
    
    .melding-modal-footer .status-icon {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .melding-modal-content {
        width: 98%;
        max-width: 480px;
        max-height: 95vh;
    }
    
    .melding-modal-image-header {
        height: 220px;
    }
    
    .melding-modal-image-header.no-image {
        height: 60px;
    }
    
    .melding-modal-header {
        padding: 1rem 1.5rem 0.75rem;
    }
    
    .melding-modal-title {
        font-size: 1.875rem;
    }
    
    .melding-modal-priority-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
    
    .melding-modal-body {
        padding: 0 1.5rem 1.5rem;
    }
    
    .melding-modal-message {
        font-size: 0.95rem;
    }
    
    .melding-modal-dates {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    .melding-modal-footer {
        padding: 0.6rem 1rem;
        min-height: 45px;
    }
    
    .melding-modal-footer .status-text {
        font-size: 0.8rem;
    }
    
    .melding-modal-footer .status-icon {
        font-size: 0.9rem;
    }
}



/* Action Button */
.melding-modal-action {
    margin-top: 20px;
    text-align: center;
}

.melding-modal-action .btn {
    display: inline-flex;
    align-items: center;
}

.melding-action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #F29100;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.melding-action-button:hover {
    background: #d17500;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(242, 145, 0, 0.3);
}

.melding-action-button:focus {
    outline: 2px solid #F29100;
    outline-offset: 2px;
    color: white;
    text-decoration: none;
}

.melding-action-button .external-icon {
    font-size: 14px;
    font-weight: normal;
}

/* Responsive button */
@media (max-width: 640px) {
    .melding-action-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    
    .melding-action-button {
        transition: none;
    }
    
    .melding-action-button:hover {
        transform: none;
        box-shadow: none;
    }
}