/**
 * Ashwered Checkout Verification - Guest Identity & OTP Styles
 */

/* ============================================================================
   Guest Identity Component
   ============================================================================ */

.ashwered-guest-identity {
    margin: 0 0 2rem 0;
    border-radius: 4px;
    padding: 0;
}

.ashwered-guest-identity__tabs {
    display: flex;
    background-color: #fff;
    border-bottom: 2px solid #ffffff;
    gap: 0;
    border-radius: 12px;
}

.ashwered-guest-identity__tab {
    flex: 1;
    padding: 1.5rem 1rem;
    background: transparent!important;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 500;
    color: #666;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    outline: none;
    border-top:0!important;
    border-left:0!important;
    border-right:0!important;
}

.ashwered-guest-identity__tab:hover {
    background-color: #eeeeee;
    color: #333;
    border-bottom: 3px solid #236aa9 !important;
}

.ashwered-guest-identity__tab.is-active {
    color: #1979c3;
    background-color: #ffffff;
    border-bottom: 3px solid #1979c3;
    font-weight: 600;
}

.ashwered-guest-identity__tab:focus {
    outline: 2px solid #1979c3;
    outline-offset: -2px;
}

.ashwered-guest-identity__panel {
    padding: 2rem 1.5rem;
}

.ashwered-guest-identity__panel[style*="display: block"],
.ashwered-guest-identity__panel:visible {
    display: block;
}

.ashwered-guest-identity__form {
    margin: 0;
}

.ashwered-contact-fields__form { width: 100%; }
.ashwered-contact-fields__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.ashwered-contact-fields__field {
    display: flex;
    flex-direction: column;
    margin: 0 0 1.5rem 0;
}

.ashwered-contact-fields__field--phone { position: relative; }

.ashwered-contact-fields__input {
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ashwered-contact-fields__input:focus {
    border-color: #1979c3;
    box-shadow: 0 0 0 2px rgba(25, 121, 195, 0.1);
    outline: none;
}

.ashwered-contact-fields__field .label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 1.3rem;
}

.ashwered-contact-fields__field.required .label::after {
    content: ' *';
    color: #e74c3c;
    font-weight: bold;
}

.ashwered-contact-fields__field.choice {
    flex-direction: row;
    align-items: center;
    margin: 1rem 0;
}

.ashwered-contact-fields__field.choice input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1979c3;
    margin-top:0!important;
}

.ashwered-contact-fields__field.choice label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.message {
    padding: 1rem;
    margin: 0 0 1rem 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.message-error,
.message.error {
    background-color: #fef5f5;
    color: #c1440e;
    border-left: 4px solid #e74c3c;
}

.actions-toolbar {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.actions-toolbar .action {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    outline: none;
}

.actions-toolbar .action.primary {
    background-color: #1979c3;
    color: #fff;
}

.actions-toolbar .action.primary:hover:not(:disabled) {
    background-color: #145a9c;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.actions-toolbar .action.primary:disabled,
.actions-toolbar .action.primary[disabled] {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================================================
   OTP Modal — Ashwered soft-blue card (checkout + registration)
   ============================================================================ */

.ashwered-otp-verify-modal {
    max-width: 42rem;
    min-width: 0;
    width: calc(100vw - 3.2rem);
    margin-inline: auto;
}

.ashwered-otp-verify-modal .modal-inner-wrap {
    background: #fff;
    border: 1px solid #bfd9f7;
    border-radius: 1.6rem;
    box-shadow: 0 8px 30px rgba(22, 50, 80, 0.08);
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 42rem;
    padding: 2.8rem 2.4rem 2.4rem;
}

.ashwered-otp-verify-modal .modal-header {
    border: 0;
    margin: 0 0 0.4rem;
    padding: 0 2.4rem 0 0;
}

.ashwered-otp-verify-modal .modal-title {
    color: #1f5a92;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.8rem;
    padding: 0;
    text-align: center;
    border-bottom: 0!important;
}

.ashwered-otp-verify-modal .action-close {
    inset-inline-end: 1.2rem;
    inset-block-start: 1.2rem;
    left: 0 !important;
    top: 0;
}
.ashwered-otp-verify-modal .action-close:before{
    color: #1f5a92!important;
    font-size: 2.2rem!important;
}

.ashwered-otp-verify-modal .modal-content {
    padding: 0;
}

.ashwered-otp-verify-modal__content {
    align-items: center;
    display: flex;
    flex-direction: column;
    text-align: center;
    width: 100%;
}

.ashwered-otp-verify-modal__icon {
    align-items: center;
    background: #eef7ff;
    border-radius: 50%;
    color: #1f5a92;
    display: inline-flex;
    height: 6.4rem;
    justify-content: center;
    margin: 0 0 1.6rem;
    width: 6.4rem;
}

.ashwered-otp-verify-modal__lead {
    color: #707070;
    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1.55;
    margin: 0 0 2rem;
    max-width: 32rem;
}

.ashwered-otp-verify-modal__field {
    margin: 0 0 1.2rem;
    text-align: start;
    width: 100%;
}

.ashwered-otp-verify-modal__label {
    color: #253040;
    display: block;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 0.8rem;
}

.ashwered-otp-verify-modal__input {
    background: #fafcfe !important;
    border: 1.5px solid #c8ddf7 !important;
    border-radius: 1.2rem !important;
    box-shadow: none !important;
    box-sizing: border-box;
    color: #1f2937 !important;
    font-size: 2rem;
    font-weight: 700;
    height: 5.6rem;
    letter-spacing: 0.45em;
    padding: 0 1.2rem !important;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.ashwered-otp-verify-modal__input:focus {
    border-color: #1f5a92 !important;
    box-shadow: 0 0 0 3px rgba(31, 90, 146, 0.12) !important;
    outline: none;
}

.ashwered-otp-verify-modal__input:disabled {
    opacity: 0.65;
}

.ashwered-otp-verify-modal__timer {
    color: #707070;
    font-size: 1.3rem;
    line-height: 1.4;
    margin: 0 0 1.2rem;
}

.ashwered-otp-verify-modal__timer-count {
    color: #1f5a92;
    font-weight: 700;
    margin-inline: 0.25rem;
}

.ashwered-otp-verify-modal__error {
    background: #fff5f5;
    border: 1px solid #f5c2c2;
    border-radius: 1rem;
    box-sizing: border-box;
    color: #b42318;
    font-size: 1.35rem;
    line-height: 1.45;
    margin: 0 0 1.4rem;
    padding: 1rem 1.2rem;
    text-align: start;
    width: 100%;
}

.ashwered-otp-verify-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.4rem;
    width: 100%;
}

.ashwered-otp-verify-modal__btn {
    align-items: center;
    border-radius: 999px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.5rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1.2;
    min-height: 5.2rem;
    padding: 0 2rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    width: 100%;
}

.ashwered-otp-verify-modal__btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    pointer-events: none;
}

.ashwered-otp-verify-modal__btn.is-loading {
    gap: 0.55rem;
    opacity: 0.85;
}

.ashwered-otp-verify-modal__btn-spinner {
    width: 1.05em;
    height: 1.05em;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ashwered-otp-verify-spin 0.7s linear infinite;
    flex: 0 0 auto;
}

@keyframes ashwered-otp-verify-spin {
    to {
        transform: rotate(360deg);
    }
}

.ashwered-otp-verify-modal__btn--primary {
    background: #1f5a92 !important;
    border: 0 !important;
    color: #fff !important;
}

.ashwered-otp-verify-modal__btn--primary:hover:not(:disabled),
.ashwered-otp-verify-modal__btn--primary:focus:not(:disabled) {
    background: #194b7a !important;
    color: #fff !important;
}

.ashwered-otp-verify-modal__btn--ghost {
    background: transparent !important;
    border: 1.5px solid #1f5a92 !important;
    color: #1f5a92 !important;
}

.ashwered-otp-verify-modal__btn--ghost:hover:not(:disabled),
.ashwered-otp-verify-modal__btn--ghost:focus:not(:disabled) {
    background: rgba(31, 90, 146, 0.06) !important;
}

@media (max-width: 768px) {
    .ashwered-guest-identity { margin: 0 0 1.5rem 0; }
    .ashwered-guest-identity__tab { padding: 1.25rem 0.75rem; font-size: 0.95rem; }
    .ashwered-guest-identity__panel { padding: 1.5rem 1rem; }
    .ashwered-contact-fields__row { grid-template-columns: 1fr; gap: 1rem; }
    .actions-toolbar {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    .actions-toolbar .action { width: 100%; padding: 1rem; }
    .ashwered-otp-verify-modal {
        width: calc(100vw - 2rem) !important;
    }
    .ashwered-otp-verify-modal .modal-inner-wrap {
        padding: 2.4rem 1.8rem 2rem;
    }
}

@media (max-width: 480px) {
    .ashwered-guest-identity { border-radius: 0; margin: 0 -1rem 1rem -1rem; }
    .ashwered-guest-identity__tab { padding: 1rem 0.5rem; font-size: 0.85rem; }
    .ashwered-guest-identity__panel { padding: 1rem; }
    .ashwered-contact-fields__row { gap: 0.75rem; }
    .ashwered-contact-fields__field .label { font-size: 0.9rem; }
    .ashwered-contact-fields__input {
        padding: 0.65rem 0.75rem;
        font-size: 16px;
    }
    .actions-toolbar { margin-top: 1.5rem; }
    .actions-toolbar .action { padding: 0.75rem 1rem; font-size: 0.95rem; }
    .ashwered-otp-verify-modal .modal-title {
        font-size: 1.8rem;
    }
    .ashwered-otp-verify-modal__input {
        font-size: 16px; /* prevent iOS zoom */
        letter-spacing: 0.35em;
    }
}

/* ============================================================================
   Address Modal Styles
   ============================================================================ */

.ashwered-address-modal { min-width: 400px; }
.ashwered-address-modal .modal-inner-wrap { padding: 2rem; }
.ashwered-address-field {
    display: flex;
    flex-direction: column;
    margin: 0 0 1.5rem 0;
}

.ashwered-address-field .label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.ashwered-address-field.required .label::after {
    content: ' *';
    color: #e74c3c;
}

.ashwered-address-input,
.ashwered-address-select {
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
}

.ashwered-address-input:focus,
.ashwered-address-select:focus {
    border-color: #1979c3;
    outline: none;
}

.ashwered-address-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid #ddd;
    padding-top: 1.5rem;
}

/* ============================================================================
   Delivery Mode Selector Styles
   ============================================================================ */

.ashwered-delivery-mode-selector { padding: 2rem 0; }

.ashwered-delivery-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
}

.ashwered-delivery-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ashwered-delivery-option {
    position: relative;
}

.ashwered-delivery-option__label {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

.ashwered-delivery-option__label:hover {
    border-color: #1979c3;
    background-color: #f9f9f9;
}

.ashwered-delivery-option__radio {
    margin-top: 0.25rem;
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #1979c3;
}

.ashwered-delivery-option__label input:checked ~ .ashwered-delivery-option__content {
    color: #1979c3;
}

.ashwered-delivery-option__label input:checked + .ashwered-delivery-option__content {
    color: #1979c3;
}

.ashwered-delivery-option__label input[type="radio"]:checked + * + * {
    color: #1979c3;
}

.ashwered-delivery-option__content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ashwered-delivery-option__title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.ashwered-delivery-option__description {
    font-size: 0.9rem;
    color: #666;
}

.ashwered-pickup-section,
.ashwered-delivery-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.ashwered-pickup-title,
.ashwered-delivery-address-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.ashwered-pickup-stores {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ashwered-pickup-store {
    position: relative;
}

.ashwered-pickup-store__label {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
}

.ashwered-pickup-store__label:hover {
    border-color: #1979c3;
    background-color: #f9f9f9;
}

.ashwered-pickup-store__radio {
    margin-right: 1rem;
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1979c3;
}

.ashwered-pickup-store__content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.ashwered-pickup-store__name {
    font-weight: 600;
    color: #333;
}

.ashwered-pickup-store__address {
    font-size: 0.9rem;
    color: #666;
}

.ashwered-pickup-store__phone {
    font-size: 0.85rem;
    color: #999;
}

.ashwered-pickup-store__distance {
    font-size: 0.85rem;
    color: #1979c3;
    font-weight: 500;
}

.ashwered-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

@media (max-width: 768px) {
    .ashwered-delivery-options { grid-template-columns: 1fr; gap: 1rem; }
    .ashwered-address-row { grid-template-columns: 1fr; gap: 0.75rem; }
    .ashwered-address-modal { min-width: auto; }
}

@media (max-width: 480px) {
    .ashwered-delivery-options { gap: 0.75rem; }
    .ashwered-delivery-option__label { padding: 1rem; }
    .ashwered-pickup-store__label { padding: 0.75rem; }
    .modal-actions { flex-direction: column-reverse; }
}
