.block-form-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
}

.block-form-modal[aria-hidden="false"] {
    display: flex;
}

.block-form-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.block-form-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    max-width: 560px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: auto;
    scroll-padding-top: 0;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: block-modal-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.block-form-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.block-form-modal-close:hover {
    background: #e0e0e0;
}

.block-form-modal-title {
    margin: 0 0 8px;
    color: #365072;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.block-form-modal-description {
    margin: 0 0 20px;
    color: rgba(22, 30, 35, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
}

.block-form-modal .ct-form-card {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.block-form-modal .ct-gf-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.block-form-modal .ct-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.block-form-modal .ct-form-label {
    display: block;
    color: #365072;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
}

.block-form-modal .ct-form-required {
    color: #e74c3c;
}

.block-form-modal .ct-form-row {
    display: flex;
    gap: 10px;
}

.block-form-modal .ct-form-field {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.block-form-modal .ct-form-field-label {
    color: rgba(22, 30, 35, 0.55);
    font-size: 0.75rem;
    font-weight: 500;
}

.block-form-modal .ct-form-input,
.block-form-modal .ct-form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(22, 30, 35, 0.15);
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #161e23;
    background: #f8fafb;
    transition: border-color 0.2s;
}

.block-form-modal .ct-form-textarea {
    min-height: 100px;
    resize: vertical;
}

.block-form-modal .ct-form-input:focus,
.block-form-modal .ct-form-textarea:focus {
    outline: none;
    border-color: #3c8dc7;
}

.block-form-modal .ct-form-input--error {
    border-color: #e74c3c;
}

.block-form-modal .ct-form-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 28px;
    border: none;
    border-radius: 999px;
    background: #fa700d;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 12px 28px rgba(250, 112, 13, 0.22);
}

.block-form-modal .ct-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(250, 112, 13, 0.28);
}

.block-form-modal .ct-form-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(22, 30, 35, 0.15);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #161e23;
    background: #f8fafb;
}

@keyframes block-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 700px) {
    .block-form-modal-content {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .block-form-modal .ct-form-row {
        flex-direction: column;
    }
}
