/**
 * World and Web Coupons - Frontend Styles
 */

/* Modal Overlay */
.ww-modal-frontend {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    animation: wwFadeIn 0.3s ease;
}

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

/* Modal Content Container */
.ww-modal-content-frontend {
    background-color: #ffffff;
    margin: 3% auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 550px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
    animation: wwSlideIn 0.3s ease;
}

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

/* Close Button */
.ww-modal-close-frontend {
    color: #999;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 10;
}

.ww-modal-close-frontend:hover,
.ww-modal-close-frontend:focus {
    color: #333;
    text-decoration: none;
}

/* Coupon Inner Container */
.ww-coupon-modal-inner {
    text-align: center;
}

/* Coupon Box (Dashed Border) */
.ww-coupon-box {
    padding: 30px 25px;
    margin: 15px 0;
    background: #fff;
    border-radius: 8px;
}

/* Logo */
.ww-coupon-logo {
    margin-bottom: 25px;
}

.ww-coupon-logo img {
    max-width: 200px;
    max-height: 80px;
    height: auto;
    width: auto;
}

/* Title */
.ww-coupon-title {
    margin: 0 0 10px;
    font-weight: bold;
    line-height: 1.2;
}

/* Subtitle */
.ww-coupon-subtitle {
    margin: 0 0 15px;
    font-weight: normal;
    line-height: 1.3;
}

/* Coupon ID */
.ww-coupon-id {
    margin: 20px 0;
    font-weight: bold;
    font-family: monospace;
    font-size: 1.1em;
    letter-spacing: 1px;
}

/* Coupon Text */
.ww-coupon-text {
    margin: 20px 0;
    line-height: 1.6;
}

/* Expiration */
.ww-coupon-expiration {
    margin: 20px 0;
    font-weight: bold;
}

/* QR Code */
.ww-coupon-qr {
    margin: 25px auto;
    display: flex;
    justify-content: center;
}

.ww-coupon-qr canvas {
    border: 1px solid #eee;
    padding: 5px;
    background: #fff;
}

/* Disclaimer */
.ww-coupon-disclaimer {
    margin: 15px 0 5px;
    display: block;
    line-height: 1.5;
}

/* Copyright */
.ww-coupon-copyright {
    margin: 5px 0 0;
    display: block;
}

/* Instruction Text with inline print button */
.ww-coupon-instruction {
    margin: 15px 0;
    font-style: italic;
    color: #666;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Print Button - Regular size */
.ww-print-btn {
    background: #2271b1;
    color: #fff !important;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ww-print-btn:hover {
    background: #135e96;
}

.ww-print-btn:active {
    background: #0a4b78;
}

/* Print Button - Small inline version */
.ww-print-btn.ww-print-btn-small {
    padding: 6px 16px;
    font-size: 12px;
    text-transform: none;
    letter-spacing: normal;
    font-style: normal;
}

/* Unavailable Coupon Styles */
.ww-coupon-unavailable {
    padding: 30px 20px;
}

.ww-coupon-unavailable-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

/* Responsive Styles */
@media (max-width: 600px) {
    .ww-modal-content-frontend {
        margin: 2% auto;
        padding: 20px 15px;
        width: 95%;
    }
    
    .ww-coupon-box {
        padding: 20px 15px;
    }
    
    .ww-coupon-logo img {
        max-width: 150px;
        max-height: 60px;
    }
    
    .ww-coupon-title {
        font-size: 1.5em;
    }
    
    .ww-coupon-subtitle {
        font-size: 1.1em;
    }
    
    .ww-print-btn {
        padding: 10px 30px;
        font-size: 14px;
    }
    
    .ww-print-btn.ww-print-btn-small {
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .ww-coupon-instruction {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================================
   Coupon Crawler  [ww_coupon_crawler]
   ============================================================ */

.ww-crawler {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.ww-crawler__card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.ww-crawler__card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.ww-crawler__image {
    width: 100%;
    line-height: 0;
}

.ww-crawler__image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.ww-crawler__body {
    padding: 14px 16px 10px;
    flex: 1;
}

.ww-crawler__title {
    font-weight: 700;
    font-size: 1.05em;
    line-height: 1.3;
    margin-bottom: 6px;
}

.ww-crawler__desc {
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.ww-crawler__footer {
    padding: 12px 16px 14px;
}

.ww-crawler__btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s;
}

.ww-crawler__btn:hover {
    background: #135e96;
}

@media (max-width: 480px) {
    .ww-crawler {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Coupon Specials  [ww_coupon_specials]
   Styled like ww-woodland-activity cards — 4 per row
   ============================================================ */

.ww-specials {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 24px 0;
}

.ww-specials--cols-1 { grid-template-columns: 1fr; }
.ww-specials--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ww-specials--cols-3 { grid-template-columns: repeat(3, 1fr); }
.ww-specials--cols-4 { grid-template-columns: repeat(4, 1fr); }

.ww-specials__card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ww-specials__card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.13);
    transform: translateY(-2px);
}

.ww-specials__image {
    width: 100%;
    line-height: 0;
}

.ww-specials__image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.ww-specials__body {
    padding: 16px 18px 10px;
    flex: 1;
}

.ww-specials__title {
    font-weight: 700;
    font-size: 1.05em;
    line-height: 1.3;
    margin-bottom: 4px;
}

.ww-specials__subtitle {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
}

.ww-specials__content {
    font-size: 0.92em;
    line-height: 1.6;
    color: #444;
    margin-top: 10px;
}

/* Inherit site list styling rather than fighting it */
.ww-specials__content ul {
    margin: 8px 0 8px 18px;
    padding: 0;
}

.ww-specials__content ul li {
    margin-bottom: 4px;
}

.ww-specials__footer {
    padding: 12px 18px 16px;
}

.ww-specials__btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s;
}

.ww-specials__btn:hover {
    background: #135e96;
}

@media (max-width: 900px) {
    .ww-specials,
    .ww-specials--cols-4 { grid-template-columns: repeat(2, 1fr); }
    .ww-specials--cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
    .ww-specials,
    .ww-specials--cols-4,
    .ww-specials--cols-3,
    .ww-specials--cols-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   Crawler animation layout (v1.16)
   ============================================================ */

.ww-crawler-wrap {
    overflow: hidden;
    width: 100%;
}

/* Override grid — crawler is now a flex row for animation */
.ww-crawler,
.ww-crawler-wrap .ww-crawler,
.jlm-infobox .ww-crawler {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: 20px;
    will-change: transform;
    transition: none;
}

.ww-crawler__card {
    flex: 0 0 260px;
}

/* ============================================================
   Lead capture form
   ============================================================ */

.ww-lead-form {
    padding: 4px 0 8px;
}

.ww-lead-heading {
    font-size: 1.25em;
    font-weight: 700;
    margin: 0 0 6px;
}

.ww-lead-subtext {
    font-size: 0.95em;
    color: #666;
    margin: 0 0 18px;
    line-height: 1.5;
}

.ww-lead-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ccc;
    border-radius: 7px;
    font-size: 15px;
    margin-bottom: 12px;
    box-sizing: border-box;
    transition: border-color 0.15s;
    font-family: inherit;
}

.ww-lead-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.16);
}

.ww-lead-opt-in {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 12.5px;
    line-height: 1.55;
    color: #555;
    cursor: pointer;
}

.ww-lead-opt-in input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ww-lead-opt-in a {
    color: #2271b1;
}

.ww-lead-privacy {
    font-size: 12px;
    color: #888;
    line-height: 1.55;
    margin: 4px 0 18px;
}

.ww-lead-privacy a {
    color: #666;
    text-decoration: underline;
}

.ww-lead-submit {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.ww-lead-submit:hover {
    background: #135e96;
}

.ww-lead-submit:disabled {
    opacity: 0.65;
    cursor: default;
}
