* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all .3s ease;
}

.popup-overlay--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.popup-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 20px;
    background: #FFFFFF;
    border-radius: 14px;
    padding: 40px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-out;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.popup-content {
    width: 100%;
}

.popup-title {
    font-family: 'Jost', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #1B1B1B;
    margin-bottom: 28px;
    text-align: center;
}

.form-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    color: #1B1B1B;
    margin-bottom: 24px;
}

.services-group, .entity-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.service-btn, .entity-btn {
    height: 42px;
    padding: 12px;
    font-size: 14px;
    font-weight: 400;
    color: #1B1B1B;
    background: transparent;
    border: 1px solid #D1D1D1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.35s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'WixMadeforDisplay';
    white-space: nowrap;
}

.service-btn.active, .entity-btn.active {
    background: #1B1B1B;
    border-color: #1B1B1B;
    color: #fff;
}

.service-btn:hover:not(.active), .entity-btn:hover:not(.active) {
    border-color: rgba(27, 27, 27, 0.2);
    background: rgba(27, 27, 27, 0.3);
}

.form-row {
    margin-bottom: 0;
}

.form-row.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

.input-group input,
.input-group textarea {
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    color: #1B1B1B;
    background: transparent;
    border: none;
    border-bottom: 1px solid #DADADA;
    outline: none;
    transition: border-bottom 0.2s;
    font-family: 'WixMadeforDisplay';
}
.input-group input {
    height: 48px;
}
.input-group textarea {
    resize: vertical;
    min-height: 80px;
    padding-top: 20px;
}

.input-group input:focus,
.input-group textarea:focus {
    border-bottom: 1px solid #1B1B1B;
}

.input-group label {
    position: absolute;
    left: 0;
    top: 14px;
    font-size: 14px;
    font-weight: 400;
    color: #8D8D8D;
    pointer-events: none;
    transition: 0.2s ease all;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -6px;
    font-size: 11px;
}

.input-group.error input,
.input-group.error textarea {
    border-bottom: 1px solid #CB0000;
}

.error-message {
    font-size: 10px;
    color: #CB0000;
    margin-top: 4px;
    display: none;
}

.error-message.show {
    display: block;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #1B1B1B;
    margin: 2px 0 28px;
}

.checkbox-custom {
    min-width: 16px;
    width: 16px;
    height: 16px;
    border: 1px solid #1B1B1B;
    border-radius: 2px;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-custom.checked {
    background: #1B1B1B;
    border-color: #1B1B1B;
    position: relative;
}

.checkbox-custom.checked::after {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg width='9' height='7' viewBox='0 0 9 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.365234 3.2131L3.79381 6.07024L8.36523 0.355957' stroke='%23EFEFEF' stroke-width='1.14031'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 9px;
    height: 7px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-input {
    display: none;
}

.checkbox-label {
    cursor: pointer;
    line-height: 1.4;
    color: #404040;
}

.checkbox-label a {
    color: #404040;
    text-decoration: underline;
}

.checkbox-error {
    font-size: 10px;
    color: #CB0000;
    margin-top: -8px;
    margin-bottom: 16px;
    display: none;
}

.checkbox-error.show {
    display: block;
}

.submit-btn {
    width: 100%;
    background: #1B1B1B;
    opacity: 0.7;
    border: none;
    border-radius: 8px;
    padding: 14.5px 20px;
    font-size: 14px;
    font-weight: 400;
    color: #FFFFFF;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn.active {
    background: #1B1B1B;
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .popup-container {
        padding: 40px 20px;
        margin: 60px 15px;
    }
    .popup-title {
        font-size: 24px;
        margin-bottom: 28px;
    }
    .form-row.two-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .services-group, .entity-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    .service-btn, .entity-btn {
        white-space: normal;
        text-align: center;
        width: 100%;
    }
    .service-btn:last-child:nth-child(odd),
    .entity-btn:last-child:nth-child(odd) {
        grid-column: span 2;
    }
    .checkbox-wrapper {
        align-items: center;
    }
}

.popup-container::-webkit-scrollbar {
    width: 5px;
}

.popup-container::-webkit-scrollbar-track {
    background: rgba(27, 27, 27, 0.1);
    border-radius: 14px;
    margin: 8px 0;
}

.popup-container::-webkit-scrollbar-thumb {
    background: #303030;
    transition: all .3s;
    border-radius: 14px;
    margin: 8px 0;
}

.popup-container::-webkit-scrollbar-thumb:hover {
    background: #1B1B1B;
    border-radius: 14px;
}
@media (max-width: 400px) {
    .entity-group {
        grid-template-columns: repeat(1, 1fr);
    }
}
.popup-success-text {
    margin-top: 24px;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    color: #1B1B1B;
}
