.plait-widget-container {
    margin: 20px 0;
    width: 100%;
}

.bnpl-card,
.bnpl-modal {
    --bnpl-main-color: #6969ff;
    --bnpl-main-color-light: #f0f0ff;
    --bnpl-secondary-color: #f1f1f1;
    --bnpl-today-color: #6969FF;
    --bnpl-future-color: #CFE2FF;
    --bnpl-future-hover: #A1A1EB;
    --bnpl-text-gray: #919191;
}

.bnpl-card *,
.bnpl-card *::before,
.bnpl-card *::after {
    box-sizing: inherit;
}

.bnpl-card {
    border: 1px solid #f1f1f1;
    box-shadow: 0px 14px 14px rgba(116, 116, 116, 0.09);
    border-radius: 16px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    background: #F3FAFF;
    padding: 20px;
    width: 100%;
}

.bnpl-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bnpl-logo {
    height: 36px;
    width: 160px;
    background: url('plait-logo.png') no-repeat center center;
    background-size: contain;
}

.bnpl-descr {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.4;
    color: #333333;
    padding: 0;
    margin: 0 0 15px 0;
}

.bnpl-help-button {
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    border: none;
    background: #e0e0e0;
    border-radius: 50%;
    color: #555;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bnpl-help-button:hover {
    background: #d0d0d0;
}

/* Стили для переключателя частей */
.plait-payments-toggle {
    display: flex;
    margin: 16px 0;
    gap: 10px;
    background: transparent;
    border: none;
    flex-wrap: wrap;
}

.plait-toggle-option {
    text-align: center;
    padding: 12px 16px;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    white-space: nowrap;
    flex: 0 1 auto;
}

.plait-toggle-option.active {
    background-color: var(--bnpl-main-color);
    color: white;
    font-weight: 600;
    border-color: var(--bnpl-main-color);
}

.plait-toggle-option:hover {
    background-color: var(--bnpl-main-color-light);
    border-color: var(--bnpl-main-color);
}

.plait-toggle-option.active:hover {
    background-color: var(--bnpl-main-color);
}

/* Стили для расписания платежей */
.bnpl-schedule-calc {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-top: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.bnpl-schedule-calc__today,
.bnpl-schedule-calc__part {
    flex: 0 0 auto;
    min-width: 140px;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    background: transparent;
}

.bnpl-schedule-calc__today:hover,
.bnpl-schedule-calc__part:hover {
    background: #F0F0FF;
}

.bnpl-schedule-calc__today:hover .bnpl-schedule-calc__descr,
.bnpl-schedule-calc__today:hover .bnpl-schedule-calc__sum,
.bnpl-schedule-calc__part:hover .bnpl-schedule-calc__descr,
.bnpl-schedule-calc__part:hover .bnpl-schedule-calc__sum {
    background: #F0F0FF;
}

.bnpl-schedule-calc__part:hover .payment-indicator {
    background: #A1A1EB;
}

.payment-indicator {
    height: 10px;
    width: 100%;
    border-radius: 5px;
    background-color: var(--bnpl-future-color);
    transition: background-color 0.2s;
    margin-bottom: 10px;
}

.payment-indicator.active {
    background-color: var(--bnpl-today-color);
}

.bnpl-schedule-calc__descr {
    margin: 0 0 8px;
    padding: 0;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    line-height: 16px;
    color: var(--bnpl-text-gray);
    background: transparent;
    transition: background-color 0.2s;
}

.bnpl-schedule-calc__sum {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 20px;
    color: #333333;
    white-space: nowrap;
    background: transparent;
    transition: background-color 0.2s;
}

.bnpl-schedule-calc__sum span {
    color: #808080;
    font-weight: normal;
}

.bnpl-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #25BF61;
}

.bnpl-feature i {
    font-size: 16px;
}

/* Модальное окно */
.bnpl-modal {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(63, 63, 63, 0.85);
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bnpl-modal--open {
    pointer-events: auto;
    opacity: 1;
}

.bnpl-modal-wrapper {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    width: 600px;
}

.bnpl-modal__header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 16px;
    display: flex;
    justify-content: flex-end;
    z-index: 10;
    border-bottom: 1px solid #f1f1f1;
}

.bnpl-modal__close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.bnpl-modal__close:hover {
    color: #333;
}

.bnpl-modal__body {
    padding: 20px;
}

.bnpl-banks-label {
    text-align: center;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #808080;
    margin-bottom: 10px;
}

.bnpl-modal__title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
    text-align: center;
    margin: 0 0 25px 0;
    color: #333;
}

.bnpl-modal-schedule {
    margin-bottom: 25px;
}

.bnpl-modal-schedule__title {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #333;
}

.bnpl-modal-schedule__payments {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.bnpl-modal-schedule__item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.bnpl-modal-schedule__item:hover {
    background: #f0f0ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(105, 105, 255, 0.1);
}

.bnpl-modal-schedule__date {
    font-family: "Roboto", sans-serif;
    font-size: 12px;
    color: #808080;
    margin-bottom: 8px;
}

.bnpl-modal-schedule__amount {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.bnpl-modal-schedule__percent {
    font-family: "Roboto", sans-serif;
    font-size: 12px;
    color: var(--bnpl-main-color);
    font-weight: 500;
}

.bnpl-modal-steps {
    margin-bottom: 25px;
}

.bnpl-modal-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.bnpl-modal-step:last-child {
    margin-bottom: 0;
}

.bnpl-modal-step__icon {
    width: 24px;
    height: 24px;
    background: var(--bnpl-main-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.bnpl-modal-step__text {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.bnpl-modal-step__text strong {
    font-weight: 600;
    color: var(--bnpl-main-color);
}

.bnpl-modal-faq {
    margin-bottom: 20px;
}

.bnpl-modal-faq__title {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #333;
}

.bnpl-modal-faq__item {
    margin-bottom: 15px;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 15px;
}

.bnpl-modal-faq__item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.bnpl-modal-faq__question {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
    cursor: pointer;
    position: relative;
    padding-right: 25px;
}

.bnpl-modal-faq__question:after {
    content: "▼";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.bnpl-modal-faq__item.active .bnpl-modal-faq__question:after {
    transform: rotate(180deg);
}

.bnpl-modal-faq__answer {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    display: none;
}

/*.bnpl-modal-faq__item.active .bnpl-modal-faq__answer {
    display: block;
}*/

.bnpl-modal-faq__answer_active {
    display: block;
}

.bnpl-modal-footer {
    padding: 20px;
    border-top: 1px solid #f1f1f1;
    text-align: center;
}

.bnpl-modal-footer__title {
    margin: 0 0 10px 0;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.bnpl-modal-footer__phone {
    display: block;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.5;
    color: #333;
    text-decoration: none;
    margin-bottom: 5px;
}

.bnpl-modal-footer__phone:hover {
    color: var(--bnpl-main-color);
}

.bnpl-modal-footer__site {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--bnpl-main-color);
    text-decoration: none;
}

.bnpl-modal-footer__site:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
    .bnpl-modal-wrapper {
        max-width: 95%;
        max-height: 95%;
        width: auto;
    }
    
    .bnpl-schedule-calc {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .bnpl-schedule-calc__today,
    .bnpl-schedule-calc__part {
        margin: 0;
        min-width: 140px;
    }
    
    .plait-payments-toggle {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .bnpl-modal-schedule__payments {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bnpl-modal__title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .bnpl-modal-schedule__payments {
        grid-template-columns: 1fr;
    }
}

/* Блокировка прокрутки при открытом модальном окне */
body.bnpl-modal-open {
    overflow: hidden;
}