/* ============ Модальное окно ============ */

.dplg-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    font-family: 'Manrope', sans-serif;
}

.dplg-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dplg-modal-container {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 40px;
    box-sizing: border-box;
    transform: translateY(14px);
    transition: transform 0.25s ease;
}

.dplg-modal-overlay.is-open .dplg-modal-container {
    transform: translateY(0);
}

.dplg-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.dplg-modal-close:hover {
    color: #fff;
}

.dplg-modal-title {
    color: #fff;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.3;
    margin: 0 0 8px;
    padding-right: 24px;
}

.dplg-modal-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 24px;
}

.dplg-modal-container * {
    box-sizing: border-box;
}

/* ============ Форма CF7 внутри модалки ============ */

.dplg-form-wrap .wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 16px;
}

.dplg-form-wrap label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.dplg-form-wrap input.wpcf7-text,
.dplg-form-wrap input.wpcf7-tel {
    display: block;
    width: 100%;
    background: transparent;
    color: #fff;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding: 14px 4px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.dplg-form-wrap input.wpcf7-text:focus,
.dplg-form-wrap input.wpcf7-tel:focus {
    outline: none;
    border-bottom-color: #108afa;
}

.dplg-form-wrap input.wpcf7-text::placeholder,
.dplg-form-wrap input.wpcf7-tel::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.dplg-form-wrap input.wpcf7-not-valid {
    border-bottom-color: #ff5a5a;
}

.dplg-form-wrap .wpcf7-not-valid-tip {
    color: #ff8080;
    font-size: 12px;
    margin-top: 6px;
}

.dplg-form-wrap .wpcf7-acceptance {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
    margin: 18px 0;
}

.dplg-form-wrap .wpcf7-acceptance a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: underline;
}

.dplg-form-wrap input[type='checkbox'] {
    margin-right: 8px;
    vertical-align: middle;
}

.dplg-form-wrap input[type='submit'],
.dplg-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: #108afa !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.15s ease;
}

.dplg-form-wrap input[type='submit']:hover,
.dplg-form-wrap input[type='submit']:focus,
.dplg-btn:hover,
.dplg-btn:focus,
.dplg-btn:visited {
    background: #0d78d9 !important;
    color: #fff !important;
}

.dplg-form-wrap input[type='submit']:active,
.dplg-btn:active {
    transform: scale(0.98);
}

.dplg-form-wrap .wpcf7-spinner {
    display: none;
}

.dplg-form-wrap .wpcf7-response-output {
    color: #ff8080;
    border-color: rgba(255, 128, 128, 0.4) !important;
    font-size: 13px;
    margin-top: 16px;
}

/* ============ Экран успеха ============ */

.dplg-success {
    text-align: center;
    animation: dplg-fade-in 0.35s ease;
}

.dplg-success__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(16, 138, 250, 0.12);
    color: #108afa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dplg-success__text {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 24px;
}

.dplg-success__files {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@keyframes dplg-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .dplg-modal-container {
        padding: 28px 20px;
        border-radius: 10px;
    }
}
