/* Loading: keep form visible, only transform verify button */
[data-component-identifier="pay-bills"] button.omantel-verify-loading,
[data-component-identifier="pay-bills"] .btn-primary.omantel-verify-loading {
    width: 100% !important;
    min-height: 48px !important;
    border: none !important;
    border-radius: 12px !important;
    background: #d1d5db !important;
    color: transparent !important;
    pointer-events: none !important;
    cursor: default !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 16px !important;
    box-shadow: none !important;
}

.omantel-verify-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.35;
    animation: omantel-dot-pulse 1.2s infinite ease-in-out;
    display: inline-block;
}

.omantel-verify-dot:nth-child(1) { animation-delay: 0s; }
.omantel-verify-dot:nth-child(2) { animation-delay: 0.2s; }
.omantel-verify-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes omantel-dot-pulse {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
    40% { opacity: 1; transform: scale(1); }
}

[data-component-identifier="pay-bills"].omantel-flow-loading #omantel-bill-host {
    display: none !important;
}

[data-component-identifier="pay-bills"] #phone-input.omantel-phone-locked {
    background-color: var(--color-neutrals-0, #fff) !important;
    color: #212121 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #212121 !important;
    cursor: default;
}

[data-component-identifier="pay-bills"] #phone-input.omantel-phone-locked:disabled {
    background-color: var(--color-neutrals-0, #fff) !important;
    border-color: var(--color-neutrals-400, #d1d5db) !important;
}

/* Ready: hide original form + duplicate Omantel header */
[data-component-identifier="pay-bills"].omantel-flow-ready [role="tablist"],
[data-component-identifier="pay-bills"].omantel-flow-ready [role="tabpanel"],
[data-component-identifier="pay-bills"].omantel-flow-ready label[for="phone-input"],
[data-component-identifier="pay-bills"].omantel-flow-ready label[for="account-input"],
[data-component-identifier="pay-bills"].omantel-flow-ready #phone-error,
[data-component-identifier="pay-bills"].omantel-flow-ready #account-error,
[data-component-identifier="pay-bills"].omantel-flow-ready #check-balance-description,
[data-component-identifier="pay-bills"].omantel-flow-ready .btn-primary:not(.omantel-bill-pay-btn) {
    display: none !important;
}

[data-component-identifier="pay-bills"].omantel-flow-ready [class*="border"][class*="rounded"]:not(.omantel-bill-card),
[data-component-identifier="pay-bills"].omantel-flow-ready .btn-secondary:not(.omantel-bill-alt-btn) {
    display: none !important;
}

[data-component-identifier="pay-bills"].omantel-flow-ready .max-w-\[400px\] > .flex.flex-col.gap-2.w-full {
    display: none !important;
}

[data-component-identifier="pay-bills"].omantel-flow-ready .max-w-\[400px\] > *:not(#omantel-bill-host) {
    display: none !important;
}

[data-component-identifier="pay-bills"].omantel-flow-ready .max-w-\[400px\] {
    align-items: stretch !important;
    text-align: right !important;
    justify-content: flex-start !important;
    max-width: 440px !important;
}

.omantel-bill-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.omantel-bill-back-wrap {
    align-self: flex-start;
    margin-bottom: 8px;
}

.omantel-bill-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
}

.omantel-bill-header h2 {
    color: #212121;
    margin: 0;
    width: 100%;
    text-align: center;
}

.omantel-bill-header-desc {
    color: #212121;
    margin: 0;
    line-height: 24px !important;
    width: 100%;
    text-align: center;
}

.omantel-bill-header-desc-line {
    display: block;
}

.omantel-bill-back {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 0 !important;
    font-family: fsAlbertArabic, sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.omantel-bill-back-icon {
    transform: rotate(-90deg);
    flex-shrink: 0;
}

/* Omantel gN card */
.omantel-bill-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 440px;
    margin-inline: auto;
    border: 1px solid #ebebeb;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    font-family: fsAlbertArabic, sans-serif;
}

.omantel-bill-phone {
    margin: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ebebeb;
}

.omantel-bill-phone-line {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    color: #212121;
}

.omantel-bill-phone-label {
    font-weight: 400 !important;
}

.omantel-bill-phone-line strong {
    direction: ltr;
    display: inline-block;
    font-weight: 800 !important;
}

.omantel-bill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px 16px;
    color: #212121;
}

.omantel-bill-label {
    font-weight: 800 !important;
    text-align: right;
    flex: 1;
}

.omantel-bill-value {
    display: inline-flex;
    align-items: center;
    gap: 0;
    direction: ltr;
    flex-shrink: 0;
    font-weight: 800 !important;
}

.omantel-bill-value img {
    width: auto;
    height: 13px;
    max-height: 13px;
    max-width: 24px;
    object-fit: contain;
    margin-inline-end: 2px;
    transform: translateY(-1px);
}

.omantel-bill-actions {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding: 16px 14px;
    border-top: 1px solid #ebebeb;
}

.omantel-bill-pay-btn {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 50px !important;
    padding-inline: 10px !important;
    border-radius: 12px !important;
    justify-content: center !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.omantel-bill-alt-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 12px 10px;
    border: 1.5px solid #ff7800;
    border-radius: 12px;
    background: #fff;
    color: #ff7800;
    font-family: fsAlbertArabic, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 22px;
    cursor: pointer;
    box-sizing: border-box;
}

.omantel-bill-alt-btn:hover {
    background: #fff7ed;
}

.omantel-bill-pay-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    direction: rtl;
}

.omantel-bill-pay-bracket-wrap {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    direction: ltr;
    unicode-bidi: isolate;
}

.omantel-bill-pay-paren {
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.omantel-bill-pay-amount {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    direction: ltr;
    unicode-bidi: isolate;
}

.omantel-bill-pay-amount-value {
    line-height: 1;
}

.omantel-bill-pay-btn .omantel-bill-pay-omr {
    height: 12px !important;
    width: auto !important;
    max-height: 12px !important;
    max-width: 22px !important;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
    transform: translateY(-2px);
}

.omantel-bill-actions--custom {
    padding: 0 !important;
    gap: 0 !important;
    border-top: none !important;
}

.omantel-bill-custom {
    background: #f4f4f4;
    padding: 16px 14px;
    border-top: 1px solid #ebebeb;
}

.omantel-bill-custom-label {
    display: block;
    margin-bottom: 10px;
    color: #212121;
    text-align: right;
    font-weight: 400 !important;
}

.omantel-bill-custom-input-wrap {
    display: flex;
    align-items: stretch;
    flex-direction: row;
    direction: ltr;
    background: #fff;
    border: 1.5px solid #212121;
    border-radius: 12px;
    overflow: hidden;
    min-height: 48px;
}

.omantel-bill-custom-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: #fff;
    padding: 12px 16px;
    color: #212121;
    direction: ltr;
    text-align: left;
    font-family: fsAlbertArabic, sans-serif;
    box-sizing: border-box;
}

.omantel-bill-custom-input:focus {
    outline: none;
}

.omantel-bill-custom-currency {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 58px;
    background: #fff;
    border-left: 1px solid #212121;
}

.omantel-bill-custom-currency img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    opacity: 0.45;
}

.omantel-bill-custom-pay {
    background: #fff;
    padding: 16px 14px;
}

.omantel-bill-custom-pay .omantel-bill-pay-btn {
    width: 100% !important;
}

.omantel-bill-custom-pay .omantel-bill-pay-btn:not(:disabled):not(.omantel-bill-pay-btn--disabled) {
    min-height: 52px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #fff !important;
    background: #ff7800 !important;
    border-color: #ff7800 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.omantel-bill-custom-pay .omantel-bill-pay-btn:not(:disabled):not(.omantel-bill-pay-btn--disabled) .omantel-bill-pay-inner {
    gap: 4px;
}

.omantel-bill-pay-btn--disabled,
.omantel-bill-pay-btn:disabled {
    background: #dcdcdc !important;
    border-color: #dcdcdc !important;
    color: #6b6b6b !important;
    cursor: not-allowed !important;
    pointer-events: none;
    box-shadow: none !important;
    opacity: 1 !important;
}

.omantel-bill-pay-btn--disabled .omantel-bill-pay-label,
.omantel-bill-pay-btn--disabled .omantel-bill-pay-paren,
.omantel-bill-pay-btn--disabled .omantel-bill-pay-amount-value,
.omantel-bill-pay-btn:disabled .omantel-bill-pay-label,
.omantel-bill-pay-btn:disabled .omantel-bill-pay-paren,
.omantel-bill-pay-btn:disabled .omantel-bill-pay-amount-value {
    color: #6b6b6b !important;
}

.omantel-bill-pay-btn--disabled .omantel-bill-pay-omr,
.omantel-bill-pay-btn:disabled .omantel-bill-pay-omr {
    filter: grayscale(1) brightness(0.55);
    opacity: 0.85;
}

/* Card payment form */
.omantel-bill-body--payment {
    padding: 0;
}

.omantel-bill-phone--payment {
    margin: 0;
    padding: 16px;
    border-bottom: 1px solid #ebebeb;
    background: #fff;
}

.omantel-card-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 10px;
    background: #f4f4f4;
}

.omantel-card-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.omantel-card-label {
    display: block;
    color: #212121;
    text-align: right;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700 !important;
}

.omantel-input-wrap {
    position: relative;
}

.omantel-input-wrap .omantel-card-input {
    padding-right: 48px;
}

.omantel-input-wrap.has-error .omantel-card-input {
    padding-right: 72px;
    border-color: #dc2626 !important;
}

.omantel-field-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.omantel-input-wrap.has-error .omantel-field-icon {
    right: 34px;
}

.omantel-field-icon img {
    display: block;
    width: auto;
    height: auto;
    max-width: 27px;
    max-height: 18px;
}

.omantel-field-icon.is-brand img {
    max-width: 34px;
    max-height: 24px;
}

.omantel-field-error-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.omantel-field-error-icon:not([hidden]) {
    display: flex;
}

.omantel-field-error-icon img {
    display: block;
    width: 16px;
    height: 16px;
}

.omantel-field-icon-cvv img {
    max-width: 40px;
    max-height: 28px;
}

.omantel-input-wrap--cvv .omantel-card-input {
    padding-right: 52px;
}

.omantel-field-icon-expiry img {
    max-width: 24px;
    max-height: 16px;
}

.omantel-input-wrap--expiry .omantel-card-input {
    padding-right: 48px;
}

.omantel-card-input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #fff;
    color: #212121;
    font-size: 15px;
    font-family: fsAlbertArabic, sans-serif;
    box-sizing: border-box;
    outline: none;
}

.omantel-card-input::placeholder {
    color: #b0b0b0;
    font-size: 14px;
}

.omantel-card-input:focus {
    border-color: #c4c4c4;
    box-shadow: none;
}

.omantel-card-form-row {
    display: flex;
    flex-direction: row;
    direction: rtl;
    gap: 8px;
}

.omantel-card-input[dir="ltr"] {
    text-align: left;
}

.omantel-bill-actions--card {
    border-top: none !important;
    background: #fff;
    padding: 14px 10px 16px !important;
}

.omantel-bill-actions--card .omantel-bill-pay-btn:not(:disabled):not(.omantel-bill-pay-btn--disabled) {
    min-height: 52px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #fff !important;
    background: #ff7800 !important;
    border-color: #ff7800 !important;
}

.omantel-card-input--error {
    border-color: #dc2626 !important;
}

.omantel-card-field-error {
    margin: 4px 0 0;
    color: #dc2626;
    font-size: 12px;
    line-height: 1.4;
    text-align: right;
    font-weight: 600;
}

.omantel-pay-waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    padding: 32px 16px 40px;
    background: #fff;
    text-align: center;
}

.omantel-pay-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid #ffe0c2;
    border-top-color: #ff7800;
    border-radius: 50%;
    animation: omantel-pay-spin 0.9s linear infinite;
}

@keyframes omantel-pay-spin {
    to { transform: rotate(360deg); }
}

.omantel-pay-waiting-title {
    margin: 8px 0 0;
    color: #212121;
    font-weight: 800 !important;
}

.omantel-pay-waiting-sub {
    margin: 0;
    color: #212121;
}

.omantel-pay-error-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.35);
}

.omantel-pay-error-modal.is-visible {
    display: flex;
}

.omantel-pay-error-card {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    font-family: fsAlbertArabic, sans-serif;
}

.omantel-pay-error-body {
    padding: 28px 20px 20px;
    text-align: center;
    border-bottom: 1px solid #ebebeb;
}

.omantel-pay-error-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
}

.omantel-pay-error-title {
    margin: 0 0 8px;
    color: #212121;
}

.omantel-pay-error-text {
    margin: 0;
    color: #212121;
}

.omantel-pay-error-btn {
    display: block;
    width: 100%;
    min-height: 52px;
    border: none;
    background: #ff7800;
    color: #fff;
    font-family: fsAlbertArabic, sans-serif;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

body.omantel-page-exiting {
    opacity: 0;
    transition: opacity 0.35s ease;
}
