/**
 * BZBGear Modals Styles
 * Стили для модальных окон (купон и партнерская программа)
 */

/* ========================================
   ОБЩИЕ СТИЛИ ДЛЯ МОДАЛЬНЫХ ОКОН
======================================== */

.bzb-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
}

.bzb-modal[aria-hidden="false"] {
    display: flex;
}

.bzb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.bzb-modal-dialog {
    position: relative;
    max-width: 850px;
    width: 90%;
    margin: auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    max-height: 90vh;
    overflow-y: auto;
}

.bzb-modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 10;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #7c7c7c;
    transition: color 0.2s;
}

.bzb-modal-close:hover {
    color: #333;
}

/* Loading State */
.bzb-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    min-width: auto;
}

.bzb-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top-color: #f2c318;
    border-radius: 50%;
    animation: bzb-spin 0.8s linear infinite;
    margin-bottom: 20px;
}

.bzb-loading-text {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    font-weight: 600;
}

/* Success State */
.bzb-modal-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    animation: bzb-fade-in 0.5s ease;
    min-width: auto;
}

/* Form Elements */
.bzb-modal-form {
    width: 100%;
}

.bzb-field {
    margin-bottom: 16px;
}

.bzb-field label {
    display: block;
    margin-bottom: 8px;
    color: #000;
    font-size: 10px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    letter-spacing: 1.494px;
}

.bzb-field input {
    border-radius: 3px;
    border: 1px solid #d9d9d9;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2.6px);
    width: 100%;
    padding: 13px 16px;
    transition: border-color 0.2s;
    color: #000;
    font-size: 12px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    letter-spacing: 1.494px;
    box-sizing: border-box;
}

.bzb-field input:focus {
    outline: none;
    border-color: #f2c318;
}

.bzb-field input.is-invalid {
    border-color: #dc2626;
    background: #fff7f7;
}

.bzb-field-error {
    margin-top: 8px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    display: none !important;
    /* Hide text, only show red border */
}

.bzb-form-error {
    margin-bottom: 12px;
    color: #dc2626;
    font-weight: 600;
    font-size: 14px;
    display: none;
}

/* Buttons */
.bzb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid #2f3132;
    transition: all 0.2s;
    color: #000;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: 100%;
}

.bzb-btn-primary {
    border-radius: 3px;
    border: 1px solid #000;
    background: #fed13b;
    box-shadow: 4px 2px 0 0 #6172f3;
}

.bzb-btn-primary:hover {
    background: #fdd200;
    transform: translateY(-1px);
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.3), 0 4px 12px rgba(242, 195, 24, 0.3);
}

.bzb-btn-primary:active {
    transform: translateY(0);
}

.bzb-btn-secondary {
    border-radius: 3px;
    border: 1px solid #000;
    background: #fff;
}

.bzb-btn-secondary:hover {
    background: #f9fafb;
}

/* ========================================
   СТИЛИ МОДАЛЬНОГО ОКНА КУПОНА (15%)
======================================== */

.bzb-coupon-content {
    display: flex;
    padding: 48px 40px;
    background: url('https://dev.bzbgear.com/wp-content/uploads/2025/12/v2-3-1.png');
    background-size: 100%;
    background-position: center center;
    min-width: 850px;
}

.bzb-coupon-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px;
    width: 70%;
}

.bzb-coupon-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30%;
}

.bzb-coupon-logo img {
    max-width: 200px;
    margin-bottom: 8px;
}

.bzb-coupon-desc {
    margin: 20px 0 18px;
    color: #000;
    font-size: 14px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    letter-spacing: 1.494px;
}

.bzb-coupon-flex {
    display: flex;
    gap: 30px;
    justify-content: space-between;
}

.bzb-coupon-col6 {
    width: 100%;
}

.bzb-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0 14px;
}

.bzb-note {
    margin-top: 6px;
    color: #777;
    font-size: 11.661px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    letter-spacing: 1.452px;
}

/* Right Side Styles */
.bzb-pattern {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.08;
    pointer-events: none;
}

.bzb-coupon-title {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #000;
    text-align: center;
    font-size: 30px;
    font-style: normal;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 1.494px;
}

.bzb-coupon-title--desktop {
    display: block;
}

.bzb-coupon-title--mobile {
    display: none;
}

.bzb-coupon-title-line {
    display: block;
}

.bzb-coupon-percent {
    display: block;
    color: #f2c318;
    font-size: 72px;
    line-height: 0.95;
    margin: 12px 0 8px;
    text-shadow: 0 2px 4px rgba(242, 195, 24, 0.15);
}

.bzb-coupon-sub {
    display: block;
    color: #000;
    text-align: center;
    font-size: 30px;
    font-style: normal;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 1.494px;
}

/* Success State для купона */
.bzb-coupon-success {
    background: url(/wp-content/themes/bzbgear/img/coupon.svg);
    background-size: cover;
}

.bzb-coupon-success-logo {
    position: absolute;
    left: 40px;
    top: 48px;
}

.bzb-coupon-success-logo img {
    max-width: 200px;
}

.bzb-coupon-success-content {
    padding: 120px 0;
    color: #000;
    text-align: center;
    font-size: 24px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    letter-spacing: 1.494px;
    max-width: 500px;
}

/* ========================================
   СТИЛИ ПАРТНЕРСКОГО МОДАЛЬНОГО ОКНА (10%)
======================================== */

.bzb-partner-dialog {
    max-width: 850px;
    width: 850px;
}

.bzb-partner-content {
    padding: 50px 60px;
    text-align: center;
    min-width: auto;
    position: relative;
    background: #fff url('/wp-content/themes/bzbgear/img/modal-pattern.png') no-repeat;
    background-position: left top, right bottom;
    background-size: auto;
}

.bzb-partner-logo {
    text-align: center;
    margin-bottom: 30px;
}

.bzb-partner-logo img {
    max-width: 180px;
    height: auto;
}

.bzb-partner-title {
    margin: 0 0 10px 0;
    color: #000;
    text-align: center;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0.5px;
}

.bzb-partner-title strong {
    font-weight: 700;
}

.bzb-partner-subtitle {
    margin: 0 0 30px 0;
    color: #000;
    text-align: center;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.bzb-partner-subtitle strong {
    font-weight: 700;
}

.bzb-partner-form-title {
    margin: 0 0 20px 0;
    color: #000;
    text-align: left;
    font-size: 14px;
    font-weight: 400;
}

.bzb-partner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.bzb-partner-grid .bzb-field {
    margin-bottom: 0;
}

.bzb-partner-grid .bzb-field label {
    text-align: left;
    font-size: 12px;
    font-weight: 400;
}

.bzb-partner-grid .bzb-field input {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 4px;
}

.bzb-btn-partner-submit {
    margin: 10px auto 0;
    width: 70%;
    max-width: 450px;
    padding: 14px;
    background: #000 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
    display: block;
}

.bzb-btn-partner-submit:hover {
    background: #333;
    transform: none;
    box-shadow: none;
}

.bzb-partner-expires {
    margin: 15px 0 0 0;
    color: #666;
    text-align: center;
    font-size: 12px;
    font-weight: 400;
}

/* Success State для партнерского окна */
.bzb-partner-success {
    border-radius: 12px;
    padding: 50px 60px;
    background: #fff;
}

.bzb-partner-success-logo {
    text-align: center;
    margin-bottom: 30px;
}

.bzb-partner-success-logo img {
    max-width: 180px;
    height: auto;
}

.bzb-partner-success-content {
    text-align: center;
}

.bzb-partner-success-content h3 {
    margin: 0 0 20px 0;
    color: #000;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.bzb-partner-success-main {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

.bzb-partner-success-sub {
    margin: 0;
    color: #555;
    font-size: 16px;
    line-height: 1.6;
}

/* ========================================
   АНИМАЦИИ
======================================== */

@keyframes bzb-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bzb-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bzb-scale-in {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* ========================================
   АДАПТИВНЫЕ СТИЛИ (МОБИЛЬНЫЕ)
======================================== */

@media (max-width: 767px) {

    /* Общие стили для мобильных */
    .bzb-modal-dialog {
        border-radius: 12px;
        max-width: 100%;
        width: 95%;
        box-shadow: 0px 0px 19.1px 0px #e7e7e7;
    }

    .bzb-partner-dialog {
        width: 95%;
    }

    .bzb-modal-loading,
    .bzb-modal-success {
        min-width: auto;
        width: 100%;
        padding: 60px 20px;
    }

    .bzb-modal-close {
        right: 12px;
        top: 12px;
    }

    /* Купон - мобильные стили */
    .bzb-coupon-content {
        display: flex;
        flex-direction: column;
        padding: 24px 20px;
        gap: 24px;
        min-width: auto;
        width: 100%;
        align-items: center;
    }

    .bzb-coupon-left {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        order: 2;
    }

    .bzb-coupon-right {
        width: 100%;
        order: 1;
        padding: 0;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
    }

    .bzb-coupon-right .bzb-pattern {
        display: none;
    }

    .bzb-coupon-left .bzb-coupon-logo {
        display: none;
    }

    .bzb-coupon-right .bzb-coupon-logo {
        display: block !important;
        text-align: center;
        margin-bottom: 6px;
        order: -1;
        position: relative;
        z-index: 1;
    }

    .bzb-coupon-right .bzb-coupon-logo img {
        max-width: 84px;
        margin-bottom: 0;
    }

    .bzb-coupon-title {
        font-size: 24px;
        text-align: center;
        line-height: 30px;
        margin: 0 0 3px 0;
        position: relative;
        z-index: 1;
    }

    .bzb-coupon-title--desktop {
        display: none;
    }

    .bzb-coupon-title--mobile {
        display: block;
    }

    .bzb-coupon-percent {
        font-size: 24px;
        line-height: 0.95;
        margin: 0;
    }

    .bzb-coupon-percent img {
        max-width: 139px;
        height: auto;
    }

    .bzb-coupon-sub {
        font-size: 24px;
        line-height: 30px;
        margin-top: 0;
    }

    .bzb-coupon-desc {
        margin: 0 0 18px 0;
        font-size: 14px;
        text-align: left;
        width: 100%;
    }

    .bzb-coupon-flex {
        flex-direction: row;
        gap: 12px;
        width: 100%;
    }

    .bzb-coupon-col6 {
        width: calc(50% - 6px);
    }

    .bzb-field {
        margin-bottom: 6px;
    }

    .bzb-field label {
        font-size: 9px;
        margin-bottom: 6px;
    }

    .bzb-field input {
        padding: 10px;
        font-size: 11px;
    }

    .bzb-actions {
        margin: 0 0 9px 0;
        gap: 10px;
        width: 100%;
    }

    .bzb-btn {
        width: 100%;
        padding: 10px;
        font-size: 12px;
    }

    .bzb-btn-primary {
        border: 1px solid #4252cb;
        box-shadow: 4px 2px 0px 0px #6172f3;
    }

    .bzb-btn-secondary {
        background: rgba(255, 255, 255, 0.23);
        backdrop-filter: blur(0.7px);
    }

    .bzb-note {
        margin-top: 0;
        font-size: 10px;
        text-align: center;
        width: 100%;
    }

    /* Партнерское окно - мобильные стили */
    .bzb-partner-content {
        padding: 24px 16px;
        min-width: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .bzb-partner-logo {
        margin-bottom: 16px;
    }

    .bzb-partner-logo img {
        max-width: 100px;
    }

    .bzb-partner-title {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .bzb-partner-subtitle {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .bzb-partner-form-title {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .bzb-partner-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bzb-partner-grid .bzb-field input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .bzb-partner-grid .bzb-field label {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .bzb-btn-partner-submit {
        padding: 12px;
        font-size: 12px;
        width: 100%;
        max-width: 100%;
        margin-top: 8px;
    }

    .bzb-partner-expires {
        margin-top: 12px;
        font-size: 11px;
    }
}