/**
 * Order confirmation modal — shared styles
 * Location: /assets/css/order-confirm.css
 */

.oc-modal .modal-dialog {
    max-width: 420px;
}

.oc-modal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.oc-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem 0.75rem;
    border-bottom: none;
}

.oc-modal__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
}

.oc-modal__title i {
    color: #64748b;
    font-size: 1rem;
}

.oc-modal__body {
    padding: 0 1.25rem 1.25rem;
}

.oc-details {
    background: #f0f7ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}

.oc-details__heading {
    font-weight: 700;
    font-size: 0.95rem;
    color: #334155;
    margin: 0 0 0.75rem;
}

.oc-details__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.35rem 0;
    font-size: 0.9rem;
}

.oc-details__label {
    color: #64748b;
    flex-shrink: 0;
}

.oc-details__value {
    font-weight: 600;
    color: #1e293b;
    text-align: right;
    word-break: break-word;
}

.oc-details__divider {
    border: none;
    border-top: 1px solid #bfdbfe;
    margin: 0.65rem 0;
}

.oc-details__amount .oc-details__value {
    font-size: 1.05rem;
    font-weight: 800;
    color: #10B981;
}

.oc-notice {
    display: flex;
    gap: 0.65rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
}

.oc-notice__icon {
    color: #f59e0b;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.oc-notice__title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #dc2626;
    margin: 0 0 0.25rem;
}

.oc-notice__text {
    font-size: 0.82rem;
    color: #b91c1c;
    margin: 0;
    line-height: 1.45;
}

.oc-notice--verification {
    background: #fffbeb;
    border-color: #fcd34d;
}

.oc-notice--verification .oc-notice__icon {
    color: #d97706;
}

.oc-notice--verification .oc-notice__title {
    color: #b45309;
}

.oc-notice--verification .oc-notice__text {
    color: #92400e;
}

.oc-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.oc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.oc-btn:active {
    transform: scale(0.98);
}

.oc-btn--cancel {
    background: #94a3b8;
    color: #fff;
}

.oc-btn--cancel:hover {
    background: #64748b;
    color: #fff;
}

.oc-btn--confirm {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.oc-btn--confirm:hover {
    background: #2563eb;
    color: #fff;
}

.oc-btn--confirm:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Storefront variant — match store accent on confirm */
.sf-body .oc-modal {
    z-index: 1060;
}

.sf-body .oc-modal.show {
    z-index: 1065 !important;
}

.sf-body .oc-btn--confirm {
    background: var(--store-accent, #635bff);
    box-shadow: 0 4px 14px rgba(99, 91, 255, 0.35);
}

.sf-body .oc-btn--confirm:hover {
    background: #5046e5;
}

/* Dashboard — emerald confirm */
.dashboard-app .oc-btn--confirm {
    background: #10B981;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.dashboard-app .oc-btn--confirm:hover {
    background: #059669;
}

/* Checking overlay — shown while recipient verify runs before confirm modal */
.oc-checking {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.oc-checking.is-visible {
    opacity: 1;
    visibility: visible;
}

.oc-checking__card {
    width: min(100%, 320px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    padding: 1.75rem 1.5rem 1.6rem;
    text-align: center;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.25s ease;
}

.oc-checking.is-visible .oc-checking__card {
    transform: translateY(0) scale(1);
}

.oc-checking__spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    border-top-color: #10B981;
    animation: oc-spin 0.85s linear infinite;
}

.dashboard-app .oc-checking__spinner {
    border-top-color: #10B981;
}

.sf-body .oc-checking__spinner {
    border-top-color: var(--store-accent, #635bff);
}

.oc-checking__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.oc-checking__text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #64748b;
}

.oc-checking__dots::after {
    content: '';
    display: inline-block;
    width: 1.1em;
    text-align: left;
    animation: oc-dots 1.2s steps(4, end) infinite;
}

@keyframes oc-spin {
    to { transform: rotate(360deg); }
}

@keyframes oc-dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
}

@media (prefers-reduced-motion: reduce) {
    .oc-checking,
    .oc-checking__card {
        transition: none;
    }

    .oc-checking__spinner,
    .oc-checking__dots::after {
        animation: none;
    }

    .oc-checking__spinner {
        border-top-color: #10B981;
        opacity: 0.85;
    }
}
