/* ==========================================================================
   Toy Box Newsletter Popup
   ========================================================================== */

.tbpop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.tbpop-overlay.tbpop-active {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.tbpop-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s ease;
}
.tbpop-overlay.tbpop-active .tbpop-modal {
    transform: translateY(0) scale(1);
}

/* Close button */
.tbpop-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.tbpop-close:hover {
    background: #E31E24;
    color: #fff;
}

/* Left image panel */
.tbpop-image {
    flex: 0 0 42%;
    overflow: hidden;
    position: relative;
}
.tbpop-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right content panel */
.tbpop-content {
    flex: 1;
    padding: 40px 36px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Heading */
.tbpop-heading {
    font-family: 'Fredoka One', cursive, sans-serif;
    font-size: 2rem;
    color: #E31E24;
    margin: 0 0 14px;
    line-height: 1.2;
}

/* Body text */
.tbpop-text {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    margin: 0 0 18px;
}

/* Divider */
.tbpop-divider {
    width: 48px;
    height: 3px;
    background: #E31E24;
    border-radius: 3px;
    margin-bottom: 22px;
}

/* Form */
.tbpop-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tbpop-field input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 50px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: #222;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.tbpop-field input:focus {
    border-color: #E31E24;
}
.tbpop-field input::placeholder {
    color: #aaa;
}

/* Checkbox row */
.tbpop-checkbox-row {
    margin-top: 4px;
}
.tbpop-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    color: #555;
    font-weight: 600;
}
.tbpop-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #E31E24;
    cursor: pointer;
    flex-shrink: 0;
}

/* Message */
.tbpop-message {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    min-height: 18px;
    border-radius: 6px;
    padding: 0;
    transition: all 0.2s;
}
.tbpop-message.success {
    color: #2e7d32;
    background: #f0fff0;
    padding: 10px 14px;
    border-radius: 8px;
}
.tbpop-message.error {
    color: #b71c1c;
    background: #fff5f5;
    padding: 10px 14px;
    border-radius: 8px;
}

/* Submit button */
.tbpop-btn {
    width: 100%;
    padding: 14px;
    background: #E31E24;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    margin-top: 4px;
}
.tbpop-btn:hover {
    background: #B71C1C;
    transform: translateY(-1px);
}
.tbpop-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success state */
.tbpop-success-msg {
    text-align: center;
    padding: 20px 0;
}
.tbpop-success-msg .tbpop-tick {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}
.tbpop-success-msg h3 {
    font-family: 'Fredoka One', cursive;
    color: #E31E24;
    font-size: 1.5rem;
    margin: 0 0 8px;
}
.tbpop-success-msg p {
    font-family: 'Nunito', sans-serif;
    color: #555;
    font-size: 14px;
    margin: 0;
}

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 600px) {
    .tbpop-modal {
        flex-direction: column;
        max-height: 95vh;
        border-radius: 12px;
    }
    .tbpop-image {
        flex: 0 0 180px;
        height: 180px;
    }
    .tbpop-content {
        padding: 24px 20px;
    }
    .tbpop-heading {
        font-size: 1.6rem;
    }
}
