/* ============================================================
   CloudPayments Widget — форма отмены подписки
   ============================================================ */

.cp-cancel {
    max-width:  460px;
    margin:     0 auto;
    font-family: inherit;
}

/* Тема сайта может переопределять шрифт списков/кнопок (ul li, button и т.п.)
   более специфичным правилом — жёстко фиксируем единый шрифт формы везде. */
.cp-cancel,
.cp-cancel * {
    font-family: inherit !important;
    font-style:  normal !important;
}

/* Единый размер шрифта во всей форме — тема (в т.ч. глобальный Elementor-кит
   вроде .elementor-kit-13 a) иногда переопределяет font-size своими правилами
   с более высоким приоритетом. Фиксируем 15px везде принудительно. */
.cp-cancel-input,
.cp-cancel-select-btn,
.cp-cancel-select-value,
.cp-cancel-select-option,
.cp-cancel-label,
.cp-cancel-field-error,
.cp-cancel-form-error,
.cp-cancel-back,
.cp-cancel-results-title,
.cp-cancel-sub-row,
.cp-cancel-sub-label,
.cp-cancel-sub-value,
.cp-cancel-notfound p,
.cp-cancel-support,
.cp-cancel-support a {
    font-size: 15px !important;
}

/* ------------------------------------------------------------
   Шаг 1: карточка формы
   ------------------------------------------------------------ */
.cp-cancel-step--form {
    background:    #252525;
    border-radius: 14px;
    padding:       28px 24px;
}

.cp-cancel-field {
    margin-bottom: 18px;
}

.cp-cancel-label {
    display:       block;
    color:         #fff;
    line-height:   1.4;
    margin-bottom: 8px;
}

.cp-cancel-input {
    width:         100%;
    box-sizing:    border-box;
    background:    #fff;
    color:         #171717;
    border:        1px solid #fff;
    border-radius: 8px;
    padding:       11px 14px;
    line-height:   1.3;
    outline:       none;
    transition:    border-color .15s ease, background .15s ease;
}

.cp-cancel-input::placeholder {
    color: #9ca3af;
}

.cp-cancel-input:focus {
    border-color: #f2c94c;
}

/* Ошибка поля: розовый фон + красно-оранжевая рамка */
.cp-cancel-field--error .cp-cancel-input {
    background:   #f8ddd5;
    border-color: #eb5e28;
}

.cp-cancel-field--error .cp-cancel-select-btn {
    background:   #f8ddd5;
    border-color: #eb5e28;
}

.cp-cancel-field-error {
    display:    block;
    color:      #eb5e28;
    text-align: center;
    margin-top: 6px;
}

.cp-cancel-field-error[hidden] {
    display: none;
}

/* Поле даты с иконкой календаря */
.cp-cancel-date-wrap {
    position: relative;
}

.cp-cancel-date-wrap .cp-cancel-input {
    padding-right: 42px;
}

.cp-cancel-date-btn {
    position:   absolute;
    top:        0;
    right:      0;
    height:     100%;
    width:      40px;
    display:    flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border:     none;
    color:      #6b7280;
    cursor:     pointer;
    padding:    0;
}

.cp-cancel-date-btn:hover {
    color: #171717;
}

/* ------------------------------------------------------------
   Кастомный date picker
   ------------------------------------------------------------ */
.cp-cancel-calendar {
    position:      absolute;
    top:           calc(100% + 6px);
    right:         0;
    z-index:       30;
    width:         272px;
    max-width:     calc(100vw - 48px);
    background:    #1e1e1e;
    border:        1px solid #3a3a3a;
    border-radius: 10px;
    padding:       12px;
    box-shadow:    0 8px 24px rgba(0, 0, 0, .45);
}

.cp-cancel-calendar[hidden] {
    display: none;
}

.cp-cancel-cal-head {
    display:        flex;
    align-items:    center;
    justify-content: space-between;
    margin-bottom:  8px;
}

.cp-cancel-cal-title {
    color:           #fff !important;
    font-size:       14px;
    font-weight:     600;
    text-transform:  capitalize;
}

.cp-cancel-cal-nav {
    background:    transparent;
    border:        none;
    color:         #fff !important;
    font-size:     20px;
    line-height:   1;
    cursor:        pointer;
    width:         28px;
    height:        28px;
    border-radius: 6px;
    display:       flex;
    align-items:   center;
    justify-content: center;
    transition:    background .15s ease;
}

.cp-cancel-cal-nav:hover {
    background: #333;
}

.cp-cancel-cal-nav:disabled {
    opacity:  .3;
    cursor:   default;
    background: transparent;
}

.cp-cancel-cal-weekdays {
    display:               grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom:         4px;
}

.cp-cancel-cal-weekdays span {
    display:        block;
    text-align:     center;
    font-size:      11px;
    color:          #9ca3af;
    text-transform: uppercase;
    padding:        4px 0;
}

.cp-cancel-cal-days {
    display:               grid;
    grid-template-columns: repeat(7, 1fr);
    gap:                   2px;
}

.cp-cancel-cal-day {
    background:    transparent;
    border:        none;
    color:         #fff !important;
    font-size:     13px;
    padding:       8px 0;
    border-radius: 6px;
    cursor:        pointer;
    transition:    background .15s ease;
}

.cp-cancel-cal-day:hover {
    background: #3a3a3a;
}

.cp-cancel-cal-day--muted {
    color: #5a5a5a !important;
}

.cp-cancel-cal-day--today {
    box-shadow: inset 0 0 0 1px #f2d43d;
}

.cp-cancel-cal-day--selected,
.cp-cancel-cal-day--selected:hover {
    background:  #f2d43d;
    color:       #171717 !important;
    font-weight: 600;
}

.cp-cancel-cal-day--disabled {
    opacity:        .3;
    cursor:         default;
    pointer-events: none;
}

/* ------------------------------------------------------------
   Кастомный дропдаун причины
   ------------------------------------------------------------ */
.cp-cancel-select {
    position: relative;
}

.cp-cancel-select-btn {
    width:         100%;
    box-sizing:    border-box;
    display:       flex;
    align-items:   center;
    justify-content: space-between;
    gap:           10px;
    background:    #fff;
    color:         #171717;
    border:        1px solid #fff;
    border-radius: 8px;
    padding:       11px 14px;
    line-height:   1.3;
    cursor:        pointer;
    text-align:    left;
    transition:    border-color .15s ease, background .15s ease;
}

.cp-cancel-select-value--placeholder {
    color: #9ca3af;
}

.cp-cancel-select-arrow {
    flex-shrink: 0;
    color:       #6b7280;
    transition:  transform .15s ease;
}

.cp-cancel-select-btn[aria-expanded="true"] .cp-cancel-select-arrow {
    transform: rotate(180deg);
}

.cp-cancel-select-list {
    position:      absolute;
    top:           calc(100% + 4px);
    left:          0;
    right:         0;
    z-index:       20;
    margin:        0;
    padding:       0;
    list-style:    none;
    background:    #fff;
    border-radius: 8px;
    overflow:      hidden;
    box-shadow:    0 8px 24px rgba(0, 0, 0, .35);
}

.cp-cancel-select-option {
    padding:       11px 14px;
    font-weight:   400;
    line-height:   1.3;
    color:         #171717;
    cursor:        pointer;
    border-bottom: 1px solid #ececec;
}

.cp-cancel-select-option:last-child {
    border-bottom: none;
}

.cp-cancel-select-option:hover,
.cp-cancel-select-option--active {
    background: #d9d9d9;
}

/* ------------------------------------------------------------
   Общая ошибка формы и кнопка отправки
   ------------------------------------------------------------ */
.cp-cancel-form-error {
    color:         #eb5e28;
    text-align:    center;
    margin-bottom: 14px;
}

.cp-cancel-form-error[hidden] {
    display: none;
}

.cp-cancel-submit {
    width:          100%;
    display:        flex;
    align-items:    center;
    justify-content: center;
    background:     #f2d43d;
    color:          #171717;
    border:         none;
    border-radius:  8px;
    padding:        13px 20px;
    font-size:      13px;
    font-weight:    600;
    letter-spacing: .06em;
    cursor:         pointer;
    transition:     background .15s ease;
    min-height:     44px;
}

.cp-cancel-submit:hover {
    background: #e8c832;
}

.cp-cancel-submit:disabled {
    cursor:  default;
    opacity: .8;
}

.cp-cancel-submit-spinner {
    width:         18px;
    height:        18px;
    border:        2px solid rgba(23, 23, 23, .25);
    border-top-color: #171717;
    border-radius: 50%;
    animation:     cp-cancel-spin .7s linear infinite;
}

.cp-cancel-submit-spinner[hidden] {
    display: none;
}

@keyframes cp-cancel-spin {
    to { transform: rotate(360deg); }
}

/* ------------------------------------------------------------
   Шаг 2: результаты
   ------------------------------------------------------------ */
.cp-cancel-step--results {
    border:        1px solid #6b6b6b;
    border-radius: 14px;
    padding:       24px;
    color:         #fff;
}

.cp-cancel-step--results[hidden],
.cp-cancel-step--form[hidden],
.cp-cancel-field[hidden] {
    display: none;
}

.cp-cancel .cp-cancel-back {
    background: transparent !important;
    border:     none !important;
    color:      #fff !important;
    cursor:     pointer;
    padding:    0;
    margin:     0 0 20px;
}

.cp-cancel-back:hover {
    opacity: .8;
}

.cp-cancel-results-title {
    margin-bottom: 20px;
}

/* Карточка найденной подписки */
.cp-cancel-sub {
    margin-bottom: 24px;
}

.cp-cancel-sub:last-child {
    margin-bottom: 0;
}

.cp-cancel-sub-row {
    display:       flex;
    gap:           8px;
    margin-bottom: 4px;
}

.cp-cancel-sub-label {
    color: #f2d43d;
}

.cp-cancel-sub-value {
    color: #fff;
}

.cp-cancel-sub-btn {
    display:        block;
    width:          100%;
    max-width:      280px;
    margin-top:     15px;
    background:     #f2d43d;
    color:          #171717;
    border:         none;
    border-radius:  8px;
    padding:        12px 20px;
    font-size:      13px;
    font-weight:    600;
    letter-spacing: .06em;
    cursor:         pointer;
    transition:     background .15s ease;
}

.cp-cancel-sub-btn:hover {
    background: #e8c832;
}

/* Отменённая подписка: всё серое, кнопка неактивна */
.cp-cancel-sub--cancelled .cp-cancel-sub-label,
.cp-cancel-sub--cancelled .cp-cancel-sub-value {
    color: #8a8a8a;
}

.cp-cancel-sub--cancelled .cp-cancel-sub-btn {
    background: #9d9d9d;
    color:      #e5e5e5;
    cursor:     default;
}

/* Не найдено / текст поддержки */
.cp-cancel-notfound p {
    margin:    0 0 18px;
    color:     #fff;
}

.cp-cancel-support {
    margin:      18px 0 0;
    line-height: 1.6;
    color:       #fff;
}

.cp-cancel-support a {
    color:           rgb(0, 153, 102);
    text-decoration: none;
}

.cp-cancel-support a:hover {
    opacity: .85;
}

/* ------------------------------------------------------------
   Пометка режима демонстрации
   ------------------------------------------------------------ */
.cp-cancel-demo-badge {
    margin-top:     20px;
    padding:        14px;
    text-align:     center;
    font-size:      26px;
    font-weight:    800;
    letter-spacing: .25em;
    text-indent:    .25em; /* компенсация letter-spacing последней буквы */
    color:          #f2d43d;
    border:         2px dashed #f2d43d;
    border-radius:  10px;
    user-select:    none;
}

/* ------------------------------------------------------------
   Мобильная адаптация
   ------------------------------------------------------------ */
@media (max-width: 480px) {
    .cp-cancel-step--form,
    .cp-cancel-step--results {
        padding: 20px 16px;
    }
}
