/**
 * GG Opening Hours - Frontend Styles
 * Design aligned with GG WhatsApp Contact plugin (#4f7345)
 */

/* Popup container */
#gg-oh-popup.gg-oh-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#gg-oh-popup.gg-oh-popup.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Overlay */
#gg-oh-popup .gg-oh-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Content */
#gg-oh-popup .gg-oh-popup-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 440px;
    width: 90%;
    margin: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(10px);
    transition: transform 0.25s ease;
    overflow: hidden;
    font-family: inherit;
    padding: 0;
    border: none;
}

#gg-oh-popup.is-visible .gg-oh-popup-content {
    transform: translateY(0);
}

/* Header with green accent bar */
#gg-oh-popup .gg-oh-popup-header {
    background: #4f7345;
    padding: 24px 24px 16px;
    position: relative;
}

/* Close button - SVG based, override all theme styles */
#gg-oh-popup button.gg-oh-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    min-width: 0;
    min-height: 0;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    outline: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0;
    line-height: 1;
    text-decoration: none;
}

#gg-oh-popup button.gg-oh-popup-close:hover,
#gg-oh-popup button.gg-oh-popup-close:focus {
    color: #fff;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

#gg-oh-popup button.gg-oh-popup-close svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Title */
#gg-oh-popup .gg-oh-popup-title {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    padding-right: 30px;
    background: none;
    border: none;
}

/* Period name */
#gg-oh-popup .gg-oh-popup-period {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

/* Schedule body */
#gg-oh-popup .gg-oh-popup-schedule {
    padding: 20px 24px;
}

#gg-oh-popup .gg-oh-popup-schedule ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#gg-oh-popup .gg-oh-popup-schedule li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

#gg-oh-popup .gg-oh-popup-schedule li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4f7345;
    border-radius: 50%;
    flex-shrink: 0;
}

#gg-oh-popup .gg-oh-popup-schedule li:last-child {
    border-bottom: none;
}

/* Custom text */
#gg-oh-popup .gg-oh-popup-custom-text {
    margin: 12px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid #eee;
    font-size: 13px;
    font-style: italic;
    color: #666;
    line-height: 1.5;
}

/* Footer */
#gg-oh-popup .gg-oh-popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

/* Remember checkbox */
#gg-oh-popup .gg-oh-popup-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    line-height: 1.3;
}

#gg-oh-popup .gg-oh-popup-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #4f7345;
}

/* Button - override all theme styles */
#gg-oh-popup button.gg-oh-popup-btn {
    background: #4f7345 !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 4px !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
    box-shadow: none !important;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none;
    line-height: 1.4;
    min-width: 0;
    min-height: 0;
    margin: 0;
}

#gg-oh-popup button.gg-oh-popup-btn:hover,
#gg-oh-popup button.gg-oh-popup-btn:focus {
    background: #3d5a36 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
}

/* Mobile: Bottom sheet */
@media screen and (max-width: 600px) {
    #gg-oh-popup.gg-oh-popup {
        align-items: flex-end;
    }

    #gg-oh-popup .gg-oh-popup-content {
        max-width: 100%;
        width: 100%;
        margin: 0;
        border-radius: 12px 12px 0 0;
        transform: translateY(100%);
    }

    #gg-oh-popup.is-visible .gg-oh-popup-content {
        transform: translateY(0);
    }

    #gg-oh-popup .gg-oh-popup-header {
        padding: 20px 20px 12px;
    }

    #gg-oh-popup .gg-oh-popup-title {
        font-size: 18px;
    }

    #gg-oh-popup .gg-oh-popup-schedule {
        padding: 16px 20px;
    }

    #gg-oh-popup .gg-oh-popup-schedule li {
        font-size: 14px;
        padding: 8px 0;
    }

    #gg-oh-popup .gg-oh-popup-footer {
        flex-direction: column;
        gap: 12px;
        padding: 16px 20px 24px;
    }

    #gg-oh-popup button.gg-oh-popup-btn {
        width: 100%;
        padding: 14px 24px !important;
        font-size: 15px;
    }
}

/* Hidden on mobile if setting disabled */
#gg-oh-popup.gg-oh-popup.hide-mobile {
    display: none;
}

@media screen and (min-width: 601px) {
    #gg-oh-popup.gg-oh-popup.hide-mobile {
        display: flex;
    }
}

/* Schedule list used in admin preview */
.gg-oh-schedule-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gg-oh-schedule-list li {
    padding: 4px 0;
}
