.aps-sms-wrap,
.aps-sms-wrap * {
    box-sizing: border-box;
}

.aps-sms-wrap {
    width: 100%;
    padding: 28px 14px;
    background: var(--aps-bg, linear-gradient(135deg, #eef5ff 0%, #fff 55%, #fff7dd 100%));
    border-radius: 18px;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: var(--aps-font-size, 16px);
    color: #172033;
}

.aps-sms-card,
.aps-sms-thankyou-card,
.aps-sms-error-card {
    max-width: 760px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(11, 61, 145, 0.10);
    border-radius: var(--aps-radius, 22px);
    box-shadow: 0 20px 55px rgba(11, 61, 145, 0.12);
    overflow: hidden;
}

.aps-sms-topline {
    height: 6px;
    background: linear-gradient(90deg, var(--aps-primary, #0b3d91), var(--aps-secondary, #f2b705));
}

.aps-sms-header {
    padding: 28px 30px 10px;
    text-align: center;
}

.aps-sms-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--aps-primary, #0b3d91);
    background: rgba(11, 61, 145, 0.08);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.aps-sms-header h2 {
    margin: 16px 0 10px;
    color: var(--aps-header-text, #0b2d5c);
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.25;
    font-weight: 800;
}

.aps-sms-description {
    max-width: 620px;
    margin: 0 auto;
    color: #536174;
    line-height: 1.75;
}

.aps-sms-description p {
    margin: 0 0 10px;
}

.aps-sms-form {
    padding: 18px 30px 32px;
}

.aps-sms-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.aps-sms-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aps-sms-field-full {
    grid-column: 1 / -1;
}

.aps-sms-field span {
    color: #1c2b3d;
    font-weight: 700;
    font-size: 14px;
}

.aps-sms-field input {
    width: 100%;
    min-height: 50px;
    border: 1px solid #d8e3f2;
    border-radius: 14px;
    padding: 12px 15px;
    background: #fbfdff;
    color: #172033;
    outline: none;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.aps-sms-field input:focus {
    border-color: var(--aps-primary, #0b3d91);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(11, 61, 145, 0.10);
}

.aps-sms-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0 8px;
    color: #26364a;
    line-height: 1.6;
    font-weight: 600;
}

.aps-sms-consent input {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    accent-color: var(--aps-primary, #0b3d91);
}

.aps-sms-privacy {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff8df;
    color: #70520a;
    border: 1px solid rgba(242, 183, 5, 0.25);
    font-size: 14px;
    line-height: 1.65;
}

.aps-sms-submit {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--aps-button, #0b63ce), var(--aps-primary, #0b3d91));
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 28px rgba(11, 99, 206, 0.24);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.aps-sms-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(11, 99, 206, 0.30);
}

.aps-sms-submit:disabled {
    cursor: not-allowed;
    opacity: 0.74;
    transform: none;
}

.aps-sms-spinner {
    display: none;
    width: 19px;
    height: 19px;
    border: 3px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: apsSmsSpin 0.8s linear infinite;
}

.aps-sms-form.is-loading .aps-sms-spinner {
    display: inline-block;
}

@keyframes apsSmsSpin {
    to { transform: rotate(360deg); }
}

.aps-sms-response {
    margin-top: 16px;
    font-weight: 700;
    line-height: 1.55;
}

.aps-sms-response.aps-error {
    color: #b42318;
}

.aps-sms-response.aps-success {
    color: #067647;
}

.aps-sms-thankyou-card {
    padding: 34px 30px;
    text-align: center;
}

.aps-sms-success-icon {
    width: 70px;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #12b76a, #067647);
    color: #fff;
    font-size: 34px;
    font-weight: 900;
    box-shadow: 0 12px 25px rgba(18, 183, 106, .25);
    margin-bottom: 16px;
}

.aps-sms-thankyou-card h3 {
    margin: 0 0 12px;
    color: #0b2d5c;
    font-size: clamp(22px, 3.5vw, 30px);
}

.aps-sms-thankyou-message {
    max-width: 640px;
    margin: 0 auto 20px;
    color: #3d4a5d;
    line-height: 1.8;
    font-size: 17px;
}

.aps-sms-thankyou-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.aps-sms-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #eef5ff;
    color: var(--aps-primary, #0b3d91);
    text-decoration: none;
    font-weight: 800;
    border: 1px solid rgba(11, 61, 145, .15);
}

.aps-sms-action-btn:hover {
    background: var(--aps-primary, #0b3d91);
    color: #fff;
}

.aps-sms-error-card {
    padding: 18px 20px;
    color: #b42318;
    background: #fff6f5;
    border-color: #ffd6d2;
    font-weight: 700;
}

.aps-sms-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.aps-sms-recaptcha {
    margin-top: 18px;
}

@media (max-width: 680px) {
    .aps-sms-wrap {
        padding: 18px 10px;
    }

    .aps-sms-header,
    .aps-sms-form,
    .aps-sms-thankyou-card {
        padding-left: 18px;
        padding-right: 18px;
    }

    .aps-sms-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .aps-sms-field-full {
        grid-column: auto;
    }

    .aps-sms-field input,
    .aps-sms-submit {
        min-height: 52px;
    }
}

.aps-sms-mail-client-note {
    max-width: 680px;
    margin: 0 auto 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff8e1;
    color: #6b4b00;
    border: 1px solid #f7df8a;
    font-weight: 700;
    line-height: 1.7;
}

.aps-sms-open-mail-btn {
    background: linear-gradient(135deg, var(--aps-primary, #0b3d91), var(--aps-button, #0b63ce));
    color: #fff !important;
    border-color: transparent;
}
