/**
 * Holiday Mode – Stylesheet
 * Custom CSS (no framework dependency)
 *
 * @author    Grayling
 * @copyright 2026 Grayling
 */

/* -------------------------------------------------------
   Variables
------------------------------------------------------- */
:root {
    --grly-hm-primary:    #E94E1B;
    --grly-hm-primary-bg: #fef3e2;
    --grly-hm-border:     #f0c27f;
    --grly-hm-text:       #7a4f0d;
    --grly-hm-white:      #ffffff;
    --grly-hm-overlay:    rgba(0, 0, 0, 0.55);
    --grly-hm-radius:     6px;
    --grly-hm-shadow:     0 4px 24px rgba(0, 0, 0, 0.18);
}

/* -------------------------------------------------------
   Banner
------------------------------------------------------- */
.grly-hm-banner {
    background-color: var(--grly-hm-primary);
    color: var(--grly-hm-white);
    padding: 10px 16px;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
    width: 100%;
    z-index: 1000;
}

.grly-hm-banner-inner {
/*    display: inline-flex;*/
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 1200px;
    margin: 0 auto;
}



.grly-hm-banner-title {
    font-weight: 700;
    font-size: 1.2rem;
}


.grly-hm-banner-message {
    opacity: 0.95;
}

/* Force la couleur héritée sur tous les enfants générés par TinyMCE */
.grly-hm-banner-message,
.grly-hm-banner-message p,
.grly-hm-banner-message span,
.grly-hm-banner-message strong,
.grly-hm-banner-message em,
.grly-hm-banner-message a {
    color: inherit !important;
    font-size: 0.9rem
}

/* -------------------------------------------------------
   Product notice & Checkout notice (shared styles)
------------------------------------------------------- */
.grly-hm-product-notice,
.grly-hm-checkout-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background-color: var(--grly-hm-primary-bg);
    border: 1px solid var(--grly-hm-border);
    border-left: 4px solid var(--grly-hm-primary);
    border-radius: var(--grly-hm-radius);
    padding: 12px 14px;
    margin: 12px 0;
    font-size: 0.875rem;
    color: var(--grly-hm-text);
}

.grly-hm-notice-icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--grly-hm-primary);
}

.grly-hm-notice-content {
    flex: 1;
}

.grly-hm-notice-content .grly-hm-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--grly-hm-primary);
}

.grly-hm-notice-content .grly-hm-message p{
    margin: 0;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* -------------------------------------------------------
   Modal overlay
------------------------------------------------------- */
.grly-hm-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--grly-hm-overlay);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* -------------------------------------------------------
   Modal box
------------------------------------------------------- */
.grly-hm-modal {
    background: var(--grly-hm-white);
    border-radius: var(--grly-hm-radius);
    box-shadow: var(--grly-hm-shadow);
    width: 50%;
    max-width: 760px;
    min-width: 300px;
    position: relative;
    overflow: visible;
    animation: grly-hm-fadeIn 0.2s ease;
}

@media (max-width: 768px) {
    .grly-hm-modal {
        width: 92%;
    }
}

@keyframes grly-hm-fadeIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Croix ronde décalée en haut à droite */
.grly-hm-close-btn {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 36px;
    height: 36px;
    background: #333;
    color: #fff;
    border: 3px solid #fff;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: background 0.15s;
}

.grly-hm-close-btn:hover {
    background: #000;
}

.grly-hm-modal-img {
    width: 100%;
    max-height: 220px;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: var(--grly-hm-radius) var(--grly-hm-radius) 0 0;
}

.grly-hm-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.grly-hm-modal-body {
    padding: 28px 28px 28px;
    border-top: 4px solid var(--grly-hm-primary);
    border-radius: 0 0 var(--grly-hm-radius) var(--grly-hm-radius);
    overflow: hidden;
}

.grly-hm-modal-body .grly-hm-title {
    margin: 0 0 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.grly-hm-modal-body .grly-hm-message {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #555;
}

/* -------------------------------------------------------
   Admin back office
------------------------------------------------------- */

.grly-hm-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #555;
    margin: 8px 0 16px;
    padding-bottom: 8px;
}
.grly-hm-current-image {
    margin-top: 10px;
}

.grly-hm-current-image img {
    max-width: 200px;
    max-height: 120px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
    margin-bottom: 6px;
}

/* Admin – ligne bandeau (switch + 2 color pickers alignés) */
.grly-hm-banner-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px 0;
    margin: 0;
}

.grly-hm-banner-row > [class*="col-"] {
    padding-left: 0;
    padding-right: 12px;
}

.grly-hm-inline-label {
    display: block;
    font-size: 0.85rem;
    color: #6c6c6c;
    margin-bottom: 4px;
}

/* Color picker widget */
.grly-hm-color-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    flex-wrap: nowrap;
    max-width: 200px;
}

.grly-hm-color-picker {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    min-width: 40px;
    height: 39px;
    padding: 2px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    background: none;
    cursor: pointer;
    flex: 0 0 40px;
}

.grly-hm-color-text {
    flex: 1 1 auto;
    border-radius: 0 4px 4px 0 !important;
    font-family: monospace;
    font-size: 0.88rem;
    height: 34px;
    min-width: 0;
}
