/**
 * Age Verification Popup Styles
 * Legendary Peptides Utilities
 */

.lpu-age-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    /* Overlay scrolls when the popup is taller than the viewport
       (mobile). Combined with margin: auto on the popup, this keeps
       it centered when it fits and top-aligned when it doesn't. */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.lpu-age-popup {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    padding: 40px;
    text-align: center;
    animation: lpuFadeIn 0.3s ease-out;
    margin: auto;
}

@keyframes lpuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lpu-age-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.lpu-age-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.lpu-age-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.lpu-age-text {
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
}

.lpu-age-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.lpu-age-button {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    min-width: 150px;
}

.lpu-age-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.lpu-age-button:active {
    transform: translateY(0);
}

.lpu-age-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .lpu-age-popup {
        padding: 30px 20px;
    }

    .lpu-age-logo {
        max-width: 150px;
    }

    .lpu-age-title {
        font-size: 20px;
    }

    .lpu-age-text {
        font-size: 16px;
    }

    .lpu-age-button {
        width: 100%;
        min-width: auto;
    }

    .lpu-age-buttons {
        flex-direction: column;
        width: 100%;
    }
}

/* ========================================
   Coupon Signup Popup Styles
   ======================================== */

.lpu-coupon-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    /* Overlay scrolls when the popup is taller than the viewport
       (mobile). Combined with margin: auto on the popup, this keeps
       it centered when it fits and top-aligned when it doesn't. */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.lpu-coupon-popup {
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 860px;
    width: 100%;
    padding: 0;
    text-align: center;
    position: relative;
    animation: lpuFadeIn 0.3s ease-out;
    margin: auto;
}

/* Header */
.lpu-coupon-header {
    padding: 30px 36px 0;
    text-align: center;
}

.lpu-coupon-body {
    padding: 18px 32px 26px;
}

.lpu-coupon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.lpu-coupon-title {
    font-size: 29px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1C2430;
    line-height: 1.25;
}

.lpu-coupon-text {
    font-size: 17px;
    line-height: 1.5;
    margin: 0;
    color: #4A5568;
}

#lpu-coupon-section {
    width: 100%;
}

.lpu-coupon-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Two-column layout */
.lpu-coupon-columns {
    display: flex;
    width: 100%;
    text-align: left;
}

.lpu-coupon-col-signup {
    flex: 1 1 58%;
    min-width: 0;
    padding-right: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lpu-coupon-col-age {
    flex: 1 1 42%;
    min-width: 0;
}

/* Handwritten "Optional" note above the signup fields */
.lpu-optional-note {
    font-family: 'Shadows Into Light', cursive;
    font-size: 24px;
    color: #2E9C8F;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    line-height: 1;
    margin: 0 0 2px;
}

.lpu-optional-note::before,
.lpu-optional-note::after {
    content: '';
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%232E9C8F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M26 6C18 10 12 16 8 25'/%3E%3Cpath d='M4 20l4 5 7-2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
    margin-top: 10px;
}

.lpu-optional-note::after {
    transform: scaleX(-1);
}

/* Inputs with icons */
.lpu-input-wrap {
    position: relative;
}

.lpu-input-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8A94A6;
    pointer-events: none;
}

.lpu-input-wrap .lpu-coupon-input {
    padding-left: 44px;
    background-color: #ffffff;
    border: 1px solid #D8DFE8;
    border-radius: 8px;
}

.lpu-coupon-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    color: #333;
}

.lpu-coupon-input:focus {
    outline: none;
    border-color: #2D6A34;
}

.lpu-coupon-input::placeholder {
    color: #999;
    opacity: 1;
}

.lpu-coupon-button {
    width: 100%;
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    background-color: #2D6A34;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.lpu-coupon-button:hover {
    background-color: #245329;
}

.lpu-coupon-button:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* Lock icon on the signup submit button (pseudo-element so JS caption
   changes via textContent don't wipe it) */
#lpu-coupon-signup-form .lpu-coupon-button::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    vertical-align: -3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* Privacy footer line */
.lpu-coupon-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #8A94A6;
    font-size: 14px;
    margin: -4px 0 0;
}

.lpu-coupon-privacy svg {
    flex-shrink: 0;
}

.lpu-field-required-note {
    color: #d63638;
    font-size: 11px;
    line-height: 1;
    text-align: left;
    margin: -8px 0 0;
}

.lpu-coupon-small-print {
    font-size: 13px;
    color: #7A8699;
    margin: 2px 0 0;
    line-height: 1.5;
    text-align: left;
}

.lpu-coupon-message {
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
}

.lpu-coupon-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 20px;
}

.lpu-coupon-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Confirmation Styles */
.lpu-confirm-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #155724;
}

.lpu-confirm-code-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.lpu-confirm-code {
    font-size: 22px;
    font-weight: 700;
    background-color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    border: 2px dashed #155724;
    letter-spacing: 1px;
}

.lpu-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #155724;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lpu-copy-btn:hover {
    color: #0a3d0a;
}

.lpu-copy-feedback {
    font-size: 12px;
    color: #155724;
    font-weight: 600;
}

.lpu-confirm-message {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.lpu-confirm-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #1a5dad;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.2s ease;
}

.lpu-confirm-button:hover {
    background-color: #154a8a;
    color: #fff !important;
}

.lpu-debug-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #c3e6cb;
    font-size: 12px;
    text-align: left;
}

/* Age Verification Column in Coupon Popup */
.lpu-age-verification-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    background-color: #F1F6EA;
    border: 1px solid #E1EBD2;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    box-sizing: border-box;
}

.lpu-age-verification-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #2D6A34;
}

.lpu-age-verification-head svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.lpu-age-verification-title {
    font-size: 18px;
    font-weight: 700;
    color: #2D6A34;
    line-height: 1.3;
    margin: 0;
}

.lpu-age-verification-text {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

.lpu-age-verification-label {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    cursor: pointer;
    line-height: 1.4;
    text-align: left;
}

.lpu-age-verification-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2D6A34;
}

.lpu-age-verification-agree {
    font-size: 15px;
    color: #222;
}

.lpu-coupon-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Coupon Popup Responsive */
@media (max-width: 700px) {
    .lpu-coupon-header {
        padding: 24px 20px 0;
    }

    .lpu-coupon-body {
        padding: 16px 18px 20px;
    }

    .lpu-coupon-columns {
        flex-direction: column;
        gap: 22px;
    }

    .lpu-coupon-col-signup {
        padding-right: 0;
    }

    .lpu-coupon-title {
        font-size: 22px;
    }

    .lpu-coupon-text {
        font-size: 15px;
    }

    .lpu-optional-note {
        font-size: 21px;
    }

    .lpu-coupon-input {
        padding: 12px 14px;
    }

    .lpu-input-wrap .lpu-coupon-input {
        padding-left: 42px;
    }

    .lpu-coupon-button {
        padding: 13px 18px;
        font-size: 16px;
    }
}

/* ========================================
   Sticky Tab Styles
   ======================================== */

.lpu-sticky-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999990;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.lpu-sticky-tab-close {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 22px;
    height: 22px;
    background-color: #666;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    z-index: 1;
    transition: background-color 0.2s ease;
}

.lpu-sticky-tab-close:hover {
    background-color: #333;
}

/* Tab no longer reopens the popup once a coupon was requested */
.lpu-sticky-tab-content.lpu-sticky-tab-no-click {
    cursor: default;
}

.lpu-sticky-tab-content {
    background-color: #333;
    color: #fff;
    padding: 15px 12px;
    cursor: pointer;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border-radius: 8px 0 0 8px;
    transition: background-color 0.2s ease;
}

.lpu-sticky-tab-content:hover {
    background-color: #444;
}

.lpu-sticky-tab-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.lpu-sticky-tab-reminder {
    font-size: 11px;
    font-weight: 600;
    background-color: #d63638;
    color: #fff;
    padding: 6px 4px;
    border-radius: 3px;
    white-space: nowrap;
}

.lpu-sticky-tab.lpu-hidden {
    display: none;
}

/* Sticky Tab Responsive */
@media (max-width: 768px) {
    .lpu-sticky-tab-content {
        padding: 12px 10px;
    }

    .lpu-sticky-tab-text {
        font-size: 12px;
    }

    .lpu-sticky-tab-reminder {
        font-size: 10px;
    }
}

/* ========================================
   Login Form Styles
   ======================================== */

.lpu-login-section {
    width: 100%;
    margin-top: 20px;
}

.lpu-login-required-note {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 0 0 20px 0;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #1a5dad;
}

.lpu-login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lpu-login-button {
    background-color: #28a745 !important;
}

.lpu-login-button:hover {
    background-color: #218838 !important;
}

.lpu-login-message {
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

.lpu-login-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.lpu-login-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.lpu-login-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    font-size: 13px;
}

.lpu-login-link {
    color: #1a5dad;
    text-decoration: none;
    transition: color 0.2s ease;
}

.lpu-login-link:hover {
    color: #154a8a;
    text-decoration: underline;
}

.lpu-login-separator {
    color: #ccc;
}

/* Login Form Responsive */
@media (max-width: 480px) {
    .lpu-login-links {
        flex-direction: column;
        gap: 8px;
    }

    .lpu-login-separator {
        display: none;
    }
}
