.checkout-form-surface {
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
    box-shadow: 0 12px 32px rgba(17, 17, 17, 0.05);
    padding: 22px;
}

.checkout-form-section + .checkout-form-section {
    margin-top: 22px;
}

.checkout-form-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.checkout-form-section-title {
    margin: 0;
    color: #111111;
    font-size: 1rem;
    font-weight: 800;
}

.checkout-form-section-copy {
    margin: 4px 0 0;
    color: #666666;
    font-size: 0.84rem;
}

.checkout-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #202020;
    font-size: 0.88rem;
    font-weight: 700;
}

.checkout-required {
    color: #d11a1a;
    font-weight: 800;
}

.checkout-optional {
    color: #7a7a7a;
    font-size: 0.75rem;
    font-weight: 600;
}

.checkout-input,
.checkout-select,
.checkout-textarea {
    min-height: 50px;
    border: 1px solid #d8dadd;
    border-radius: 14px;
    padding: 0.82rem 0.95rem;
    color: #111111;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.checkout-textarea {
    min-height: 110px;
    resize: vertical;
}

.checkout-input::placeholder,
.checkout-textarea::placeholder {
    color: #9a9a9a;
}

.checkout-input:focus,
.checkout-select:focus,
.checkout-textarea:focus {
    border-color: rgba(219, 20, 20, 0.6);
    box-shadow: 0 0 0 4px rgba(219, 20, 20, 0.1);
}

.checkout-input.is-invalid,
.checkout-select.is-invalid,
.checkout-textarea.is-invalid {
    border-color: #dc3545;
    background: #fff8f8;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.08);
}

.checkout-input.is-valid,
.checkout-select.is-valid,
.checkout-textarea.is-valid {
    border-color: #198754;
    background: #f7fffa;
}

.field-feedback {
    min-height: 18px;
    margin-top: 7px;
    color: #7a7a7a;
    font-size: 0.78rem;
    line-height: 1.4;
}

.field-feedback.is-error {
    color: #c62828;
}

.field-feedback.is-success {
    color: #1d7d3c;
}

.field-help {
    margin-top: 7px;
    color: #777777;
    font-size: 0.76rem;
}

.address-form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.address-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.05);
    color: #222222;
    font-size: 0.78rem;
    font-weight: 700;
}

.address-form-badge i {
    color: #db1414;
}

.address-form-empty-state {
    border: 1px dashed rgba(219, 20, 20, 0.25);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(219, 20, 20, 0.05), rgba(255, 255, 255, 0.95));
    padding: 22px;
    margin-bottom: 18px;
}

.address-form-empty-state h6 {
    margin: 0 0 8px;
    color: #111111;
    font-size: 1rem;
    font-weight: 800;
}

.address-form-empty-state p {
    margin: 0;
    color: #6d6d6d;
    font-size: 0.88rem;
}

.location-tools {
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 18px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.location-search-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.location-search-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.location-search-results {
    display: none;
    margin-top: 12px;
    border: 1px solid #ececec;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 28px rgba(17, 17, 17, 0.08);
    overflow: hidden;
}

.location-search-results.show {
    display: block;
}

.location-search-option {
    width: 100%;
    border: 0;
    background: #ffffff;
    text-align: left;
    padding: 13px 14px;
    color: #202020;
    font-size: 0.88rem;
    line-height: 1.45;
    transition: background-color 0.16s ease;
}

.location-search-option + .location-search-option {
    border-top: 1px solid #f2f2f2;
}

.location-search-option:hover,
.location-search-option:focus {
    background: #fff5f5;
}

.location-status,
.pin-lookup-status,
.address-selection-status,
.payment-inline-status {
    min-height: 20px;
    font-size: 0.8rem;
    line-height: 1.4;
}

.location-status.is-loading,
.pin-lookup-status.is-loading,
.address-selection-status.is-loading,
.payment-inline-status.is-loading {
    color: #b35c00 !important;
}

.location-status.is-success,
.pin-lookup-status.is-success,
.address-selection-status.is-success,
.payment-inline-status.is-success {
    color: #198754 !important;
}

.location-status.is-error,
.pin-lookup-status.is-error,
.address-selection-status.is-error,
.payment-inline-status.is-error {
    color: #d93025 !important;
}

.payment-inline-status {
    margin-top: 12px;
}

.location-helper-note {
    margin-top: 8px;
    color: #666666;
    font-size: 0.78rem;
}

.location-map-wrapper {
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 18px;
    padding: 10px;
    background: #ffffff;
}

.location-map {
    width: 100%;
    height: 230px;
    border-radius: 14px;
    overflow: hidden;
}

.pin-field-shell {
    position: relative;
}

.pin-loader {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(219, 20, 20, 0.15);
    border-top-color: #db1414;
    animation: checkout-spin 0.8s linear infinite;
    display: none;
}

.pin-field-shell.is-loading .pin-loader {
    display: inline-block;
}

.password-field-shell {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #555555;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 6px;
}

.password-toggle:focus {
    outline: none;
    color: #111111;
}

.password-strength-card {
    margin-top: 14px;
    padding: 14px;
    border-radius: 16px;
    background: #fafafa;
    border: 1px solid #efefef;
}

.password-strength-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.password-strength-head strong {
    color: #111111;
    font-size: 0.85rem;
}

.password-strength-label {
    font-size: 0.78rem;
    font-weight: 800;
}

.password-strength-label.is-weak {
    color: #c62828;
}

.password-strength-label.is-medium {
    color: #b26a00;
}

.password-strength-label.is-strong {
    color: #1f8f46;
}

.password-strength-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #ececec;
    overflow: hidden;
    margin-bottom: 12px;
}

.password-strength-bar > span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.22s ease, background-color 0.22s ease;
}

.password-rules {
    display: grid;
    gap: 8px;
}

.password-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #686868;
    font-size: 0.79rem;
}

.password-rule i {
    width: 16px;
    text-align: center;
}

.password-rule.is-valid {
    color: #1d7d3c;
}

.password-rule.is-invalid {
    color: #7a7a7a;
}

.password-match {
    margin-top: 8px;
    font-size: 0.79rem;
    font-weight: 700;
}

.password-match.is-error {
    color: #c62828;
}

.password-match.is-success {
    color: #1d7d3c;
}

.checkout-inline-alert {
    border-radius: 16px;
    border: 1px solid transparent;
    padding: 14px 16px;
    font-size: 0.88rem;
}

.checkout-inline-alert.alert-danger {
    border-color: rgba(217, 48, 37, 0.18);
    background: #fff5f5;
    color: #8a1f1f;
}

.checkout-inline-alert.alert-success {
    border-color: rgba(25, 135, 84, 0.18);
    background: #f4fff8;
    color: #1c6d3d;
}

.address-item .address-radio {
    margin-top: 4px;
}

.address-item.is-syncing {
    opacity: 0.74;
    pointer-events: none;
}

.address-item.selected .address-radio {
    accent-color: #db1414;
}

.payment-form-container.is-submitting .checkout-btn,
.checkout-btn.is-loading {
    pointer-events: none;
}

.payment-submit-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    display: inline-block;
    animation: checkout-button-spin 0.7s linear infinite;
}

.checkout-processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 17, 17, 0.42);
    backdrop-filter: blur(4px);
}

.checkout-processing-overlay[hidden] {
    display: none !important;
}

.checkout-processing-card {
    width: min(100%, 360px);
    border-radius: 24px;
    background: #ffffff;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 22px 50px rgba(17, 17, 17, 0.18);
}

.checkout-processing-card .payment-submit-spinner {
    width: 26px;
    height: 26px;
    border-width: 3px;
    border-color: rgba(219, 20, 20, 0.18);
    border-top-color: #db1414;
    margin-bottom: 14px;
}

.checkout-processing-card strong {
    display: block;
    color: #111111;
    font-size: 1rem;
    font-weight: 800;
}

.checkout-processing-card p {
    margin: 8px 0 0;
    color: #666666;
    font-size: 0.88rem;
}

@keyframes checkout-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

@keyframes checkout-button-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 991.98px) {
    .location-search-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .checkout-form-surface {
        padding: 16px;
        border-radius: 18px;
    }

    .location-tools {
        padding: 14px;
        border-radius: 16px;
    }

    .location-map {
        height: 200px;
    }
}
