/* ===========================
   PAYMENT.CSS — FINAL COMPLETE VERSION
   =========================== */

/* --- Reset / Performance Hints --- */
* { box-sizing: border-box; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
html,body { height:100%; }
img { max-width:100%; display:block; }

/* Prevent ugly tap highlight on mobile and ensure fast taps */
button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Hardware acceleration hints for animated elements */
.btn-3d, .payment-option, .hero-section h1, .hero-section p {
  will-change: transform, opacity;
}

/* Allow reduced motion preferences to respect user setting */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* --- Base Page Styles --- */
body {
    background-color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #3b2f2f;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* --- HERO SECTION (CINEMATIC COFFEE STYLE) --- */
.hero-section {
    position: relative;
    text-align: center;
    padding: 100px 20px 80px;
    background: linear-gradient(145deg, #6f4e37, #3b2f2f);
    color: #fff;
    box-shadow: inset 0 -6px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border-bottom: 6px solid #4e3629;
    background-size: 200% 200%;
    animation: heroPan 18s ease-in-out infinite;
}

.hero-section::before,
.hero-section::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 200, 120, 0.35) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

.hero-section::before { top: -80px; left: -60px; }
.hero-section::after { bottom: -60px; right: -80px; }

@keyframes heroGlow {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 0.9; }
    100% { transform: scale(1); opacity: 0.6; }
}

@keyframes heroPan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-section h1 {
    position: relative;
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #f8e3c4;
    text-shadow:
        2px 2px 0 #3b2f2f,
        4px 4px 6px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(255, 200, 120, 0.5);
    animation: heroTextPop 2.5s ease-out;
    z-index: 1;
    margin: 0;
}

.hero-section p {
    position: relative;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #ffe0b3;
    margin-top: 14px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    animation: heroSubtleFade 3s ease-in-out 1.2s forwards;
    opacity: 0;
    z-index: 1;
}

@keyframes heroTextPop {
    0% { transform: translateY(30px) scale(0.95); opacity: 0; }
    60% { transform: translateY(-5px) scale(1.05); opacity: 1; }
    100% { transform: translateY(0) scale(1); }
}

@keyframes heroSubtleFade { to { opacity: 1; } }

/* --- Layout containers --- */
.container { max-width: 1180px; margin: 0 auto; padding: 18px; }
.grid { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
.panel { width: 100%; }
.card { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 6px 24px rgba(0,0,0,0.06); }

/* --- General Button Styles (Squared 3D) --- */
.btn-3d {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    background-color: #6f4e37;
    color: #fff;
    box-shadow: 0 6px 0 #3b2f2f;
    transition: transform 180ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms, filter 180ms;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-3d:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 9px 0 #3b2f2f;
    filter: brightness(1.02);
}

.btn-3d:active {
    transform: translateY(3px) scale(0.98);
    box-shadow: 0 3px 0 #3b2f2f;
}

/* Small press animation for touch (fast) */
.btn-3d.btn-shake {
    animation: btnShake 600ms ease;
}
@keyframes btnShake {
    0% { transform: translateY(0) rotate(0deg); }
    30% { transform: translateY(-2px) rotate(-1deg); }
    60% { transform: translateY(0) rotate(1deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* --- Special Glow Animation --- */
.btn-lighting { animation: pulseGlow 1.6s ease-in-out infinite; }
@keyframes pulseGlow {
    0%,100% { box-shadow: 0 6px 0 #3b2f2f, 0 0 12px rgba(255, 200, 0, 0.12); }
    50% { box-shadow: 0 9px 0 #3b2f2f, 0 0 20px rgba(255, 200, 0, 0.22); }
}

/* --- Payment Option Buttons --- */
.payment-options { display:flex; gap:8px; flex-wrap:wrap; align-items:center; justify-content:flex-start; margin:12px 0; }
.payment-option {
    margin: 6px;
    font-weight: 800;
    border-radius: 10px;
    padding: 14px 22px;
    border: 3px solid transparent;
    min-width: 140px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    cursor: pointer;
    text-align: center;
    user-select: none;
}

.payment-option.mtn { background-color: #ffb300; color: #000; }
.payment-option.airtel { background-color: #d32f2f; color: #fff; }

.payment-option:hover { transform: translateY(-3px); box-shadow: 0 10px 16px rgba(0,0,0,0.2); }
.payment-option:active { transform: translateY(1px) scale(0.99); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }

.payment-option.selected {
    border-color: rgba(0,0,0,0.9);
    transform: scale(1.06);
    box-shadow: 0 12px 22px rgba(0,0,0,0.25);
    outline: none;
}

/* --- Cart Summary and Companions --- */
.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
    font-weight: 600;
    background: #fff9f2;
    border-radius: 10px;
    padding: 14px;
    margin-top: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cart-summary div { display:flex; justify-content:space-between; }
.cart-summary strong { font-size:1.1rem; color:#3b2f2f; }

/* companions area */
.cart-companions { margin-top: 12px; padding: 10px; border-radius: 8px; background: #fff5e6; box-shadow: inset 0 1px 3px rgba(0,0,0,0.06); }
.cart-companions h4 { margin:0 0 6px; color:#6f4e37; font-weight:700; }
.cart-companions .companion-item { display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px dashed rgba(0,0,0,0.08); font-size:0.95rem; }
.cart-companions .companion-item:last-child { border-bottom:none; }

/* --- Copy, Add, Back, and USSD Buttons --- */
.copy-individual, #copyMerchant, #showUSSD, .btn-3d.add-items, .btn-3d.go-back {
    border-radius: 10px;
    font-size: 0.95rem;
    padding: 10px 18px;
    min-width: 100px;
    transition: transform 160ms ease, box-shadow 160ms ease;
    cursor: pointer;
}

.copy-individual.mtn, #copyMerchant.mtn, #showUSSD.mtn, .btn-3d.add-items { background-color: #ffb300; color: #000; }
.copy-individual.airtel, #copyMerchant.airtel, #showUSSD.airtel, .btn-3d.go-back { background-color: #d32f2f; color: #fff; }

.copy-individual:hover, #copyMerchant:hover, #showUSSD:hover, .btn-3d.add-items:hover, .btn-3d.go-back:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 rgba(0,0,0,0.28);
}

/* --- WhatsApp & Call Support Buttons --- */
#whatsapp-confirm, #callSupport {
    background-color: #25d366;
    color: #fff;
    border-radius: 10px;
    font-weight: 800;
    min-width: 140px;
    padding: 14px 22px;
    box-shadow: 0 6px 0 #1b9e51;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

#whatsapp-confirm:hover, #callSupport:hover { background-color:#20b858; transform: translateY(-3px); box-shadow: 0 9px 0 #1b9e51; }
#whatsapp-confirm:active, #callSupport:active { transform: translateY(3px); box-shadow: 0 3px 0 #1b9e51; }

/* --- Inputs --- */
.btn-input {
    width: 100%;
    padding: 12px 14px;
    margin: 8px 0;
    border-radius: 10px;
    border: 2px solid #ccc;
    font-size: 1rem;
    font-weight: 600;
    box-sizing: border-box;
    transition: border-color 150ms, box-shadow 150ms;
}

.btn-input:focus {
    border-color: #6f4e37;
    outline: none;
    box-shadow: 0 6px 18px rgba(111,78,55,0.08);
}

/* --- Floating WhatsApp Button --- */
#waFloat {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 999;
    background-color: #25d366;
    color: #fff;
    border-radius: 10px;
    padding: 14px 20px;
    box-shadow: 0 6px 0 #1b9e51;
    text-decoration: none;
    font-weight: 700;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

#waFloat:hover { background-color: #1ebe5d; transform: translateY(-3px); }

/* --- Toast Notifications --- */
#toast {
    min-width: 180px;
    max-width: 420px;
    text-align: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(17,17,17,0.95);
    color: #fff;
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.25s ease;
    font-weight: 700;
    pointer-events: none;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* Accessibility focus ring (keyboard users) */
button:focus, a:focus, input:focus, select:focus {
    outline: 3px solid rgba(111,78,55,0.18);
    outline-offset: 3px;
    border-radius: 8px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .grid { grid-template-columns: 1fr 360px; gap:18px; }
}
@media (max-width: 880px) {
    .grid { grid-template-columns: 1fr; }
    .hero-section { padding: 70px 16px 60px; }
    .hero-section h1 { font-size: 2.1rem; }
    .hero-section p { font-size: 1rem; }
    .container { padding: 12px; }
}

/* Mobile-specific button stacking and sizing */
@media (max-width: 768px) {
    .btn-3d, .payment-option, #whatsapp-confirm, #callSupport, #waFloat, .copy-individual, #copyMerchant, #showUSSD {
        width: 100%;
        font-size: 0.95rem;
        padding: 12px 14px;
        border-radius: 10px;
        min-width: auto;
        box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
    }

    .payment-option { margin: 8px 0; }
    #waFloat { left: 12px; bottom: 12px; padding: 12px 16px; }
    #toast { bottom: 16px; right: 10px; left: 10px; max-width: calc(100% - 40px); }
}

/* --- Utility helpers --- */
.hidden { display: none !important; }
.row { display:flex; gap:10px; align-items:center; }
.col { display:flex; flex-direction:column; gap:10px; }

/* Ensure interactive elements are prominent and large enough for touch guidelines */
button, .payment-option, .btn-3d { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }

/* Microcopy / subtle helper text */
.small { font-size: 0.9rem; color: rgba(0,0,0,0.65); }

/* final small adjustments for crisp active feedback */
button:active, .btn-3d:active, .payment-option:active { transition-duration: 80ms; transform: translateY(1px) scale(0.995); box-shadow: 0 3px 6px rgba(0,0,0,0.12); }

/* End of file */
/* ===========================
   PAYMENT.CSS — BUTTON & INTERACTION FINAL TOUCHES
   =========================== */

/* Ensure all buttons and payment options have perfect padding & touch targets */
.btn-3d, .payment-option, .copy-individual, #copyMerchant, #showUSSD,
#whatsapp-confirm, #callSupport, .btn-3d.add-items, .btn-3d.go-back {
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 20px;
    padding-right: 20px;
    min-height: 44px;
    border-radius: 10px;
    font-size: 1rem;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

/* Mobile adjustments: stack buttons and ensure full width with comfortable padding */
@media (max-width: 768px) {
    .btn-3d, .payment-option, .copy-individual, #copyMerchant, #showUSSD,
    #whatsapp-confirm, #callSupport, .btn-3d.add-items, .btn-3d.go-back {
        width: 100%;
        padding: 12px 16px;
        min-width: auto;
        font-size: 0.95rem;
        box-shadow: 0 6px 0 rgba(0,0,0,0.18);
    }

    .payment-option { margin: 8px 0; }
    #waFloat { left: 12px; bottom: 12px; padding: 12px 16px; }
}
