/**
 * Cynaroides Holiday Notice Styles
 * Scoped under .cyn-hn-* to guarantee isolation from theme & third-party styles.
 */

/* ==========================================================================
   1. Top Ribbon Banner
   ========================================================================== */

.cyn-hn-ribbon {
    position: relative;
    z-index: 10000;
    width: 100%;
    background-color: #1c1917;
    color: #f5f5f4;
    border-top: 2px solid #b4533c;
    border-bottom: 1px solid #292524;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: opacity 0.25s ease, max-height 0.3s ease;
}

.cyn-hn-ribbon.is-dismissed {
    display: none !important;
}

.cyn-hn-ribbon-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cyn-hn-ribbon-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.cyn-hn-ribbon-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.cyn-hn-ribbon-text {
    flex: 1;
    min-width: 200px;
    color: #e7e5e4;
}

.cyn-hn-ribbon-text strong {
    color: #fed7aa;
    font-weight: 600;
}

.cyn-hn-desktop-text {
    display: inline;
}

.cyn-hn-mobile-text {
    display: none;
}

.cyn-hn-ribbon-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(254, 215, 170, 0.4);
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cyn-hn-ribbon-btn:hover,
.cyn-hn-ribbon-btn:focus-visible {
    background-color: #b4533c;
    border-color: #b4533c;
    color: #ffffff;
    outline: none;
}

.cyn-hn-desktop-btn-text {
    display: inline;
}

.cyn-hn-mobile-btn-text {
    display: none;
}

.cyn-hn-ribbon-close {
    background: none;
    border: none;
    color: #a8a29e;
    font-size: 20px;
    line-height: 1;
    padding: 4px 6px;
    cursor: pointer;
    transition: color 0.15s ease;
    border-radius: 4px;
}

.cyn-hn-ribbon-close:hover,
.cyn-hn-ribbon-close:focus-visible {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    outline: none;
}

@media (max-width: 768px) {
    .cyn-hn-ribbon {
        font-size: 12px;
    }
    .cyn-hn-desktop-text {
        display: none;
    }
    .cyn-hn-mobile-text {
        display: inline;
    }
    .cyn-hn-desktop-btn-text {
        display: none;
    }
    .cyn-hn-mobile-btn-text {
        display: inline;
    }
    .cyn-hn-ribbon-container {
        padding: 6px 12px;
    }
}

/* ==========================================================================
   2. Modal Lightbox
   ========================================================================== */

.cyn-hn-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1c1917;
}

.cyn-hn-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: cynHnFadeIn 0.25s ease-out;
}

.cyn-hn-modal-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    margin: 16px;
    display: flex;
    flex-direction: column;
}

.cyn-hn-modal-dialog {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    overflow: hidden;
    animation: cynHnSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyn-hn-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 14px;
    border-bottom: 1px solid #f0eeeb;
    background-color: #faf9f7;
}

.cyn-hn-modal-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #b4533c;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.cyn-hn-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1c1917;
    line-height: 1.3;
}

.cyn-hn-modal-close-btn {
    background: #f5f4f0;
    border: none;
    font-size: 22px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #57534e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.cyn-hn-modal-close-btn:hover,
.cyn-hn-modal-close-btn:focus-visible {
    background-color: #e7e5e4;
    color: #000000;
    outline: none;
}

.cyn-hn-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

/* Flyer Image */
.cyn-hn-flyer-container {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #f7f6f2;
}

.cyn-hn-flyer-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Details Card */
.cyn-hn-details-card {
    background: #faf9f7;
    border: 1px solid #eeece7;
    border-radius: 10px;
    padding: 18px 20px;
}

.cyn-hn-card-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #292524;
}

.cyn-hn-card-intro {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: #57534e;
}

/* Milestones Grid */
.cyn-hn-milestones-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.cyn-hn-milestone {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    transition: border-color 0.15s ease;
}

.cyn-hn-milestone-deadline {
    background: #fff7ed;
    border: 1.5px solid #ea580c;
}

.cyn-hn-milestone-icon {
    font-size: 18px;
    line-height: 1.2;
    flex-shrink: 0;
}

.cyn-hn-milestone-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cyn-hn-milestone-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #78716c;
}

.cyn-hn-milestone-deadline .cyn-hn-milestone-label {
    color: #c2410c;
}

.cyn-hn-milestone-date {
    font-size: 15px;
    font-weight: 700;
    color: #1c1917;
}

.cyn-hn-milestone-deadline .cyn-hn-milestone-date {
    color: #9a3412;
}

.cyn-hn-milestone-desc {
    font-size: 12px;
    color: #57534e;
    margin-top: 2px;
}

/* Callout Box */
.cyn-hn-callout-box {
    background: #ffffff;
    border-left: 3px solid #b4533c;
    border-radius: 0 6px 6px 0;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.cyn-hn-callout-title {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 700;
    color: #b4533c;
}

.cyn-hn-callout-box p {
    margin: 0;
    font-size: 13px;
    color: #44403c;
    line-height: 1.45;
}

/* Support Box */
.cyn-hn-support-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    margin-bottom: 14px;
}

.cyn-hn-support-text {
    font-size: 12.5px;
    color: #166534;
    font-weight: 500;
}

.cyn-hn-wa-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #25D366;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.cyn-hn-wa-button:hover,
.cyn-hn-wa-button:focus-visible {
    background-color: #1eb855;
    transform: translateY(-1px);
    outline: none;
}

.cyn-hn-wa-icon {
    flex-shrink: 0;
}

.cyn-hn-signoff {
    margin: 14px 0 0 0;
    font-size: 12px;
    color: #78716c;
    text-align: center;
}

/* Modal Footer */
.cyn-hn-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #f0eeeb;
    background-color: #faf9f7;
    display: flex;
    justify-content: flex-end;
}

.cyn-hn-btn-close-modal {
    background-color: #1c1917;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cyn-hn-btn-close-modal:hover,
.cyn-hn-btn-close-modal:focus-visible {
    background-color: #b4533c;
    outline: none;
}

/* ==========================================================================
   3. Cart & Checkout Warning Alerts
   ========================================================================== */

.cyn-hn-woocommerce-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 18px;
    margin: 18px 0 24px 0;
    background-color: #fffaf5;
    border: 1px solid #fed7aa;
    border-left: 4px solid #ea580c;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1c1917;
}

.cyn-hn-alert-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.cyn-hn-alert-content {
    flex: 1;
    min-width: 240px;
}

.cyn-hn-alert-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #9a3412;
    margin-bottom: 2px;
}

.cyn-hn-alert-message {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #44403c;
}

.cyn-hn-alert-btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    background-color: #ffffff;
    color: #9a3412;
    border: 1.5px solid #fdba74;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cyn-hn-alert-btn:hover,
.cyn-hn-alert-btn:focus-visible {
    background-color: #b4533c;
    border-color: #b4533c;
    color: #ffffff;
    outline: none;
}

/* Animations */
@keyframes cynHnFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cynHnSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
