/* ============================================
   Woodmart Header Blocks — Frontend Styles
   ============================================ */

.whb-info-block {
    background: var(--whb-bg, #cef0ef);
    color: var(--whb-color, #3b1f8c);
    padding: 20px 24px;
    margin-bottom: 32px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    animation: whbSlideIn 0.45s ease both;
}

@keyframes whbSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.whb-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    direction: rtl;
}

body.rtl .whb-inner,
html[dir="rtl"] .whb-inner { direction: rtl; }

/* Title */
.whb-title {
    font-weight: 900;
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.1;
    margin: 0 0 6px;
    letter-spacing: -0.5px;
}

/* Subtitle with animated underline via ::after SVG background */
.whb-subtitle {
    font-size: clamp(20px, 3.5vw, 36px);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 16px;
    display: inline-block;
    position: relative;
    padding-bottom: 22px;
}
.whb-subtitle strong { font-weight: 900; }
.whb-subtitle p { margin: 0; }

/* The animated underline using clip-path animation */
.whb-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background-image: var(--whb-underline-svg, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M2,12 C40,6 90,15 140,10 C165,8 182,5 196,2 C198,1 199,3 197,5' fill='none' stroke='%234C1678' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"));
    background-repeat: no-repeat;
    background-size: 100% 100%;
    /* clip-path animation: start from right (0 width), grow to full */
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0s;
}

.whb-info-block.is-visible .whb-subtitle::after {
    clip-path: inset(0 0% 0 0);
    transition: clip-path 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

/* Fine print */
.whb-fine-print {
    font-size: 13px;
    opacity: 0.65;
    line-height: 1.7;
    margin: 6px 0 0;
    text-align: center;
}
.whb-fine-print p { margin: 0; }

/* Coupon */
.whb-coupon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
}

.whb-coupon-label {
    font-size: 13px;
    opacity: 0.7;
}

.whb-coupon-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.45);
    border: 2px dashed currentColor;
    color: inherit;
    padding: 8px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1.5px;
    transition: background .2s, transform .15s;
    position: relative;
    overflow: hidden;
}
.whb-coupon-btn:hover  { background: rgba(255,255,255,0.65); transform: scale(1.03); }
.whb-coupon-btn:active { transform: scale(0.98); }

.whb-copy-icon { opacity: .65; display: flex; align-items: center; }

.whb-copied-msg {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.7); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit; font-size: 13px; font-weight: 700;
    border-radius: 4px; opacity: 0;
    pointer-events: none; transition: opacity .2s;
    letter-spacing: .5px;
}
.whb-coupon-btn.whb-copied .whb-copied-msg { opacity: 1; }

/* Responsive */
@media (max-width: 768px) {
    .whb-info-block { padding: 36px 18px; margin-bottom: 24px; }
}
@media (max-width: 480px) {
    .whb-info-block { padding: 26px 14px; margin-bottom: 20px; }
    .whb-coupon-btn { font-size: 14px; padding: 7px 16px; }
}
