/* Payment method icons — custom CSS, not generic card-brand sprites */

.payment-methods {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-shrink: 0;
}

.pay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 2rem;
    border-radius: 0.35rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pay-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.pay-icon--visa {
    background: linear-gradient(135deg, #1a1f71 0%, #2d4db5 100%);
}

.pay-icon--visa::before {
    content: 'VISA';
}

.pay-icon--mastercard {
    background: linear-gradient(135deg, #eb001b 0%, #f79e1b 100%);
    position: relative;
    overflow: hidden;
}

.pay-icon--mastercard::before {
    content: '';
    position: absolute;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    left: 0.55rem;
    box-shadow: 1.1rem 0 0 rgba(255, 255, 255, 0.55);
}

.pay-icon--mpesa {
    background: linear-gradient(135deg, #49b848 0%, #00754a 100%);
    font-size: 0.55rem;
}

.pay-icon--mpesa::before {
    content: 'M-PESA';
}

/* Payment card layout */

.payment-card {
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(30, 41, 59, 0.15);
    animation: slideUp 0.5s ease-out;
}

.payment-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.75rem 2rem 1rem;
    background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 100%);
    color: #f8fafc;
}

.payment-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.payment-card__subtitle {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
    max-width: 22rem;
}

.payment-card__body {
    padding: 1.75rem 2rem 2rem;
}

.payment-trust {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.65rem;
    font-size: 0.85rem;
    color: #166534;
    margin-top: 0.5rem;
}

.payment-trust i {
    margin-top: 0.15rem;
    color: #16a34a;
}

.btn-pay {
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 0.75rem;
    padding: 0.9rem 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-pay:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    color: #fff;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat widget */

.chat-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1050;
    font-family: inherit;
}

.chat-widget__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.45);
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-widget__toggle:hover {
    transform: scale(1.04);
}

.chat-widget__badge {
    font-size: 0.85rem;
}

.chat-widget__panel {
    position: absolute;
    bottom: calc(100% + 0.75rem);
    right: 0;
    width: min(22rem, calc(100vw - 2rem));
    height: 24rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-widget__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: #0f172a;
    color: #f8fafc;
}

.chat-widget__header small {
    display: block;
    opacity: 0.75;
    font-size: 0.75rem;
}

.chat-widget__close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
}

.chat-widget__messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: #f8fafc;
}

.chat-msg {
    max-width: 85%;
    padding: 0.6rem 0.85rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.chat-msg--bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    border-bottom-left-radius: 0.25rem;
}

.chat-msg--user {
    align-self: flex-end;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.chat-msg--typing {
    opacity: 0.6;
    font-style: italic;
}

.chat-widget__input {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.chat-widget__input input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    outline: none;
}

.chat-widget__input input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.chat-widget__input button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background: #6366f1;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.chat-widget__input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .payment-card__header {
        flex-direction: column;
    }

    .chat-widget {
        bottom: 1rem;
        right: 1rem;
    }
}
