.apb-form {
    max-width: 520px;
    width: 100%;
}

.apb-field {
    margin-bottom: 18px;
}

.apb-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: inherit;
}

.apb-field input,
.apb-field textarea,
.apb-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    color: inherit;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.apb-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.apb-field input:focus,
.apb-field textarea:focus,
.apb-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.apb-field textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.apb-required {
    color: #ef4444;
    margin-left: 2px;
}

.apb-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.5;
}

.apb-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-top: 2px;
    padding: 0;
    cursor: pointer;
    border-radius: 4px;
    accent-color: #2563eb;
}

.apb-consent-field {
    color: #6b7280;
    font-size: 13px;
}

.apb-consent-field a {
    color: #2563eb;
    text-decoration: underline;
}

.apb-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 11px 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, opacity 0.15s;
    line-height: 1.4;
}

.apb-submit:hover {
    background: #1d4ed8;
}

.apb-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.apb-form-message {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    display: none;
}

.apb-form-message:not(:empty) {
    display: block;
}

.apb-form-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.apb-form-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.apb-tel-ext-wrap {
    display: flex;
    gap: 0;
    width: 100%;
}

.apb-tel-ext-wrap .apb-tel-dialcode {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding-right: 28px;
    font-size: 14px;
    max-width: 160px;
}

.apb-tel-ext-wrap .apb-tel-number {
    flex: 1 1 0;
    min-width: 0;
    border-radius: 0 6px 6px 0;
}

.apb-tel-ext-wrap .apb-tel-dialcode:focus {
    z-index: 1;
    position: relative;
}

.apb-tel-ext-wrap .apb-tel-number:focus {
    z-index: 1;
    position: relative;
}

.apb-tel-ext-detecting .apb-tel-dialcode {
    opacity: 0.6;
    pointer-events: none;
}
