/**
 * СОПД Стили - kuzova-luidor.ru
 * v=3.9 - Усиленная блокировка для .btn-standart, .red-btn
 */

.sopd-agreement-wrapper {
    margin-top: 15px;
    margin-bottom: 15px;
    text-align: left;
}

/* Стили для однострочных форм */
.one-row-form .sopd-agreement-wrapper {
    margin-top: 5px;
    margin-bottom: 5px;
    padding-left: 0;
}

.sopd-agreement-item {
    position: relative;
    margin-bottom: 10px;
}

.sopd-agreement-item input[type="checkbox"] {
    display: none !important;
}

.sopd-agreement-item label {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.4;
    display: inline-block;
    color: inherit;
}

.sopd-agreement-item label:before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    width: 16px;
    height: 16px;
    border: 1px solid #d1d5db;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.sopd-agreement-item input[type="checkbox"]:checked+label:before {
    background-color: #cc0000;
    border-color: #cc0000;
}

.sopd-agreement-wrapper .sopd-agreement-item input[type="checkbox"]:checked+label:after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 10px;
    height: 6px;
    border: solid #fff !important;
    border-width: 0 0 2px 2px !important;
    transform: rotate(-45deg);
}

.sopd-agreement-item label a.sopd-link {
    text-decoration: underline;
    color: #cc0000;
    transition: color 0.2s ease;
}

.sopd-agreement-item label a.sopd-link:hover {
    color: #ff0000;
}

/* Компактная версия */
.sopd-agreement-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.sopd-compact-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.sopd-compact-item input[type="checkbox"] {
    display: none !important;
}

.sopd-compact-item label {
    position: relative;
    padding-left: 22px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 300;
    line-height: 1.3;
    color: inherit;
}

.sopd-compact-item label:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 14px;
    height: 14px;
    border: 1px solid #d1d5db;
    background-color: #fff;
    border-radius: 2px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sopd-compact-item input[type="checkbox"]:checked+label:before {
    background-color: #cc0000;
    border-color: #cc0000;
}

.sopd-compact-item input[type="checkbox"]:checked+label:after {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 10px;
    height: 6px;
    border: solid #fff !important;
    border-width: 0 0 2px 2px !important;
    transform: rotate(-45deg);
}

.sopd-compact-item label a.sopd-link {
    text-decoration: underline;
    color: #cc0000;
    transition: color 0.2s ease;
}

/* Ошибки */
.sopd-agreement-item.sopd-error label:before,
.sopd-compact-item.sopd-error label:before {
    border-color: #ef4444 !important;
    box-shadow: 0 0 5px rgba(239, 68, 68, 0.4);
}

/* ================================
   БЛОКИРОВКА КНОПКИ (СЕРАЯ)
   ================================ */

/* Усиленное правило спецификации для всех типов кнопок */
input[type="submit"].sopd-btn-blocked,
input[type="button"].sopd-btn-blocked,
button.sopd-btn-blocked,
.btn-standart.sopd-btn-blocked,
.red-btn.sopd-btn-blocked,
.first-button.sopd-btn-blocked,
.btn.sopd-btn-blocked,
.sopd-btn-blocked {
    background: #9ca3af !important;
    background-color: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #fff !important;
    cursor: not-allowed !important;
    filter: grayscale(1) !important;
    opacity: 0.8 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Баббл */
.sopd-error-bubble {
    position: absolute;
    bottom: calc(100% + 12px);
    left: -14px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    border: 1px solid #ff9800;
    padding: 10px 18px;
    border-radius: 8px;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.15), 0 10px 15px -8px rgba(0, 0, 0, 0.1);
    z-index: 10000 !important;
    font-size: 13px;
    line-height: 1.4;
    color: #111827;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    animation: sopdPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sopd-error-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 15px;
    border: 7px solid transparent;
    border-top-color: #ffffff;
}

.sopd-error-bubble .sopd-icon {
    background: #ff9800;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

@keyframes sopdPopIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 640px) {
    .sopd-error-bubble {
        position: relative !important;
        left: 0 !important;
        width: 100% !important;
        white-space: normal !important;
        margin-bottom: 10px;
    }
}

/* Адаптация чекбоксов внутри попапов kuzova-luidor */
.tireos_popup .sopd-agreement-wrapper {
    margin-top: 10px;
    margin-bottom: 10px;
}

.tireos_popup .sopd-agreement-item label {
    color: #606060;
}

/* Адаптация для формы not_found_than_find */
.not-found-than-find-wrapper .sopd-agreement-wrapper {
    margin-top: 10px;
    margin-bottom: 5px;
    padding: 0 15px;
}

/* Адаптация для кнопки формы поиска */
.submit-wrapper .sopd-agreement-wrapper {
    margin-top: 0;
    margin-bottom: 10px;
}