/**
 * ----------------------------------------------
 * @author       Zbigniew Stanejko <info@prestashop.cc>
 * @copyright    © 2012-2026 Zbigniew Stanejko, PrestaPremium. All rights reserved.
 * @license      This program is not free software. You may not sell or distribute it.
 * @link         https://prestapremium.com
 * ----------------------------------------------
 * @file         views/css/pprecaptcha.css
 * @updated      2026-02-12
 * @description  Styles for reCAPTCHA widget containers
 */

/* Main container */
.pprecaptcha-container {
    margin: 10px 0;
    clear: both;
}

/* Widget wrapper */
.pprecaptcha-widget {
    display: inline-block;
    margin: 5px 0;
}

/* Error message */
.pprecaptcha-error {
    margin-top: 5px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 3px;
    width: 100%;
}

.pprecaptcha-error.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* v3 notice */
.pprecaptcha-notice {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    line-height: 1.4;
}

.pprecaptcha-notice a {
    color: #888;
    text-decoration: underline;
}

/* Alignment */
.pprecaptcha-align-left {
    display: flex;
    justify-content: flex-start;
}

.pprecaptcha-align-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pprecaptcha-align-right {
    display: flex;
    justify-content: flex-end;
}

.pprecaptcha-notice a:hover {
    color: #555;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .pprecaptcha-widget {
        transform: scale(0.9);
        transform-origin: 0 0;
    }

    .pprecaptcha-container {
        margin: 8px 0;
    }
}

@media (max-width: 480px) {
    .pprecaptcha-widget {
        transform: scale(0.77);
        transform-origin: 0 0;
    }
}

/* Dark theme support */
[data-theme="dark"] .pprecaptcha-notice,
.dark .pprecaptcha-notice,
.theme-dark .pprecaptcha-notice {
    color: #aaa;
}

[data-theme="dark"] .pprecaptcha-notice a,
.dark .pprecaptcha-notice a,
.theme-dark .pprecaptcha-notice a {
    color: #ccc;
}

[data-theme="dark"] .pprecaptcha-error.alert-danger,
.dark .pprecaptcha-error.alert-danger,
.theme-dark .pprecaptcha-error.alert-danger {
    color: #f5c6cb;
    background-color: #4a1520;
    border-color: #721c24;
}

/* Hide badge for inline v3 if desired */
.pprecaptcha-v3 .grecaptcha-badge {
    /* Override if needed */
}

/* Position adjustments */
.pprecaptcha-container[data-position="before_submit"] {
    margin-bottom: 15px;
}

.pprecaptcha-container[data-position="after_form"] {
    margin-top: 15px;
}

/* ============================================== */
/* #3 =pp form  */
/* ============================================== */
.bootstrap .fixed-width-xxl:has(.pprecaptcha-form) {
    max-width: 100%;
}



/* ============================================== */
/* #3 =pp comments */
/* ============================================== */
.product-comment-modal .post-comment-buttons:has(.pprecaptcha-form-product_comment) {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    flex-wrap: wrap;
}



/* ============================================== */
/* #3 =pp password */
/* ============================================== */
.center-email-fields:has(.pprecaptcha-form-password_reset),
.form-footer:has(.pprecaptcha-container) {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 2px;
}