/* Overlay */
.cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .55);
    backdrop-filter: saturate(130%) blur(2px);
    display: none; /* прячем через JS */
    z-index: 9998;
    cursor: pointer;
}

/* Modal: всегда flex-центрирование; прячем через visibility/opacity */
.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex; /* важно для центрирования */
    align-items: center;
    justify-content: center;
    padding: 16px;

    visibility: hidden; /* скрыто по умолчанию */
    opacity: 0;
    transition: opacity .15s ease;
}

.cc-modal[aria-hidden="false"] {
    visibility: visible;
    opacity: 1;
}

.cc-card {
    position: relative;
    width: min(880px, 100%);
    max-height: 92vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.cc-title {
    font: 600 18px/1.2 ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial;
    color: #111827;
}

.cc-close {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 8px;
    border-radius: 10px;
}

.cc-body {
    overflow: auto;
    padding: 16px;
    background: #fff
}

.cc-footer {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    padding: 14px 16px;
    border-top: 1px solid rgba(0, 0, 0, .06);
    background: #fafafa
}

.cc-btn {
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600
}

.cc-btn-primary {
    background: #111827;
    color: #fff
}

.cc-btn-ghost {
    background: transparent
}

/* Grid формы */
.cc-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 18px 24px;
    align-items: start
}

@media (max-width: 900px) {
    .cc-grid {
        grid-template-columns:1fr
    }
}

/* Поля */
.cc-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0
}

.cc-group--wide {
    grid-column: 1 / -1
}

.cc-lbl {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #111827
}

/* Инпуты/селекты */
.cc-control,
.cc-control-row .cc-control {
    width: 100%;
    min-height: 44px;
    line-height: 1.2;
    padding: 10px 12px;
    border: 1px solid #D1D5DB !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #111827;
    box-sizing: border-box;
    box-shadow: none !important
}

.cc-control:focus {
    outline: 2px solid #ff6d00;
    outline-offset: 2px
}

select.cc-control {
    background-position: right 10px center
}

/* Контакт с чипом */
.cc-control-row {
    display: flex;
    align-items: center;
    gap: 8px
}

input.cc-control {
    border-radius: 10px 10px !important
}

/* Чекбоксы */
.cc-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #111827
}

.cc-check input {
    width: 18px;
    height: 18px
}

/* Подсказка i (если используете) */
.cc-i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: #eef2ff;
    color: #3730a3;
    cursor: pointer
}

/* Decoy submit — оставить в DOM, но не показывать */
.cc-decoy {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: .01
}
