/**
 * DPS Account Registration — Form Styles
 */

.dps-ar-shell {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 0;
}

.dps-ar-form__title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.dps-ar-form__intro {
    margin: 0 0 28px;
    color: #475569;
    line-height: 1.65;
    font-size: 0.95rem;
}

.dps-ar-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 560px) {
    .dps-ar-form__grid {
        grid-template-columns: 1fr 1fr;
    }

    .dps-ar-form__field:has(textarea),
    .dps-ar-form__field:has(select[multiple]),
    .dps-ar-form__field:has(.dps-ar-form__submit) {
        grid-column: 1 / -1;
    }
}

.dps-ar-form__field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dps-ar-form__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.dps-ar-form__required {
    color: #dc2626;
}

.dps-ar-form__help {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}

.dps-ar-form__input {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #0f172a;
    background-color: #fff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    appearance: none;
}

.dps-ar-form__input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.dps-ar-form__input--error,
.dps-ar-form__input.dps-ar-form__input--error {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.dps-ar-form__input--error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.dps-ar-form__error-msg {
    font-size: 0.8125rem;
    color: #dc2626;
    font-weight: 500;
}

.dps-ar-form textarea.dps-ar-form__input {
    resize: vertical;
    min-height: 88px;
}

.dps-ar-form select.dps-ar-form__input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 36px;
    cursor: pointer;
}

.dps-ar-form__footer {
    grid-column: 1 / -1;
    padding-top: 8px;
}

.dps-ar-form__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background-color: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    line-height: 1;
}

.dps-ar-form__submit:hover {
    background-color: #1d4ed8;
}

.dps-ar-form__submit:active {
    background-color: #1e40af;
    transform: translateY(1px);
}

.dps-ar-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Notices */
.dps-ar-notice {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.dps-ar-notice p { margin: 0; }

.dps-ar-notice--success {
    background-color: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #166534;
}

.dps-ar-notice--error {
    background-color: #fef2f2;
    border: 1.5px solid #fca5a5;
    color: #991b1b;
}

.dps-ar-notice--warning {
    background-color: #fffbeb;
    border: 1.5px solid #fde68a;
    color: #92400e;
}

.dps-ar-notice--info {
    background-color: #eff6ff;
    border: 1.5px solid #93c5fd;
    color: #1e40af;
}

.dps-ar-notice ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.dps-ar-notice li {
    margin-bottom: 4px;
}

/* Form field error state */
.dps-ar-form__field--error .dps-ar-form__label {
    color: #dc2626;
}

/* Processing state */
.dps-ar-form.is-submitting .dps-ar-form__submit {
    opacity: 0.75;
    cursor: wait;
}

.dps-ar-form.is-submitting .dps-ar-form__submit::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dps-ar-spin 0.6s linear infinite;
    margin-left: 4px;
}

@keyframes dps-ar-spin {
    to { transform: rotate(360deg); }
}
