/* ==============================================
   BILL STYLES
   Extracted from bill.html
   ============================================== */

body {
    background: var(--fluent-gray-10);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* Navigation - Logo Left, Breadcrumbs, Secure Right */
.bill-nav {
    position: fixed;
    top: 20px;
    left: 5%;
    right: 5%;
    width: 90%;
    background: var(--fluent-white);
    border: 2px solid var(--fluent-black);
    border-radius: 12px;
    padding: 15px 30px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bill-nav .nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bill-nav .nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.bill-nav .nav-brand img {
    height: 40px;
}

.bill-nav .breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--fluent-gray-70);
}

.bill-nav .breadcrumbs a {
    color: var(--fluent-gray-70);
    text-decoration: none;
    transition: color 0.2s;
}

.bill-nav .breadcrumbs a:hover {
    color: var(--fluent-black);
}

.bill-nav .breadcrumbs .separator {
    color: var(--fluent-gray-50);
}

.bill-nav .breadcrumbs .current {
    color: var(--fluent-black);
    font-weight: 600;
}

.bill-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--fluent-success);
    font-weight: 600;
}

.bill-nav .nav-right i {
    font-size: 16px;
}

/* Main layout */
main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 5% 40px;
    width: 100%;
    box-sizing: border-box;
}

/* Billing Title */
.billing-title {
    text-align: center;
    margin-bottom: 40px;
}

.billing-title h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.billing-title p {
    color: var(--fluent-gray-70);
    font-size: 16px;
}

/* Split Layout */
.bill-container {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: start;
}

/* Left Side - Form */
.bill-form-section {
    background: var(--fluent-white);
    border-radius: var(--fluent-radius-large);
    padding: 32px;
    box-shadow: var(--fluent-shadow-8);
    border: 1px solid var(--fluent-black);
}

/* Form Steps */
.form-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.form-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--fluent-gray-40);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--fluent-gray-40);
    color: var(--fluent-gray-70);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.3s;
}

.step.active .step-number {
    background: var(--fluent-black);
    color: var(--fluent-white);
}

.step-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fluent-gray-70);
}

.step.active .step-label {
    color: var(--fluent-black);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* Right Side - Order Summary */
.bill-summary-section {
    background: var(--fluent-white);
    border-radius: var(--fluent-radius-large);
    padding: 24px;
    box-shadow: var(--fluent-shadow-8);
    position: sticky;
    top: 20px;
    border: 1px solid var(--fluent-black);
}

.bill-summary-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--fluent-gray-30);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Summary Items */
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--fluent-gray-30);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .label {
    color: var(--fluent-gray-70);
    font-size: 14px;
}

.summary-item .value {
    font-weight: 600;
}

.summary-item.total {
    padding-top: 20px;
    margin-top: 8px;
    border-top: 2px solid var(--fluent-gray-40);
    border-bottom: none;
}

.summary-item.total .label {
    font-size: 18px;
    font-weight: 700;
    color: var(--fluent-black);
}

.summary-item.total .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--fluent-success);
}

/* Empty Summary */
.empty-summary {
    text-align: center;
    padding: 30px;
    color: var(--fluent-gray-70);
}

.empty-summary i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Pay Button */
.pay-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 24px;
    background: var(--fluent-success);
    border: none;
    border-radius: var(--fluent-radius-medium);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.pay-btn:hover {
    background: #0e6b0e;
    transform: translateY(-1px);
}

.pay-btn:disabled {
    background: var(--fluent-gray-60);
    cursor: not-allowed;
    transform: none;
}

/* Payment Methods */
.payment-methods {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--fluent-gray-30);
}

.payment-methods p {
    font-size: 13px;
    color: var(--fluent-gray-70);
    margin-bottom: 12px;
}

.payment-methods img {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Button Group */
.btn-group {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .bill-container {
        grid-template-columns: 1fr;
    }

    .bill-summary-section {
        position: static;
        order: -1;
    }

    .form-steps {
        overflow-x: auto;
    }

    .step-label {
        font-size: 11px;
    }

    /* Secure payment - icon only on mobile */
    .bill-nav .nav-right span {
        display: none;
    }
}

/* Fixed Pay Button on Mobile ONLY */
@media (max-width: 900px) {
    .mobile-pay-fixed {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--fluent-white);
        padding: 16px 20px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        z-index: 100;
        display: block;
    }

    .mobile-pay-fixed .pay-btn {
        width: 100%;
        padding: 16px;
        font-size: 16px;
        background: linear-gradient(135deg, #107c10 0%, #0e6b0e 100%);
        color: white;
        border: none;
        border-radius: 12px;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .mobile-pay-fixed .pay-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

    .mobile-pay-fixed .pay-total {
        text-align: center;
        font-size: 13px;
        color: var(--fluent-gray-70);
        margin-bottom: 8px;
    }

    .mobile-pay-fixed .pay-total strong {
        font-size: 18px;
        color: var(--fluent-black);
    }

    /* Add padding to footer so content isn't hidden behind fixed button */
    .landing-footer {
        padding-bottom: 100px;
    }
}

/* Hide mobile pay on desktop */
@media (min-width: 901px) {
    .mobile-pay-fixed {
        display: none;
    }
}

/* ================================================
           PAYMENT MODAL STYLES - Exact copy from checkout.html
           ================================================ */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.payment-modal.active {
    opacity: 1;
    visibility: visible;
}

.payment-modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.payment-left {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 100%;
}

.payment-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 124, 16, 0.15) 0%, transparent 50%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.phone-mockup {
    position: relative;
    width: 200px;
    height: 400px;
    background: #000;
    border-radius: 36px;
    padding: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 3px #333;
    z-index: 1;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
}

.phone-screen video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 24px;
    background: #000;
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

.payment-timer-section {
    margin-top: 30px;
    text-align: center;
    z-index: 1;
}

.timer-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 4px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    position: relative;
}

.timer-circle::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #107c10;
    animation: timer-spin 1s linear infinite;
}

@keyframes timer-spin {
    to {
        transform: rotate(360deg);
    }
}

.timer-display {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.timer-display.warning {
    color: #ffb900;
}

.timer-display.danger {
    color: #d13438;
    animation: timer-pulse 0.5s ease-in-out infinite;
}

@keyframes timer-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.timer-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-top: 4px;
}

.payment-methods-modal {
    margin-top: 24px;
    z-index: 1;
}

.payment-methods-modal img {
    height: 36px;
    opacity: 0.9;
}

.payment-right {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.payment-header {
    margin-bottom: 28px;
}

.payment-header h3 {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-header h3 i {
    color: #107c10;
}

.payment-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.payment-instructions {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.instruction-title {
    font-size: 13px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction-title i {
    color: #ffb900;
}

.instruction-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instruction-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 15px;
    color: #333;
}

.instruction-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.instruction-list li:first-child {
    padding-top: 0;
}

.instruction-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #107c10 0%, #0e6b0e 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.instruction-text strong {
    color: #1a1a1a;
}

.progress-section {
    margin-top: auto;
}

.progress-title {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    position: relative;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 14px;
    top: 42px;
    width: 2px;
    height: calc(100% - 14px);
    background: #e5e7eb;
}

.progress-step.active:not(:last-child)::after {
    background: linear-gradient(to bottom, #107c10, #e5e7eb);
}

.progress-step.completed:not(:last-child)::after {
    background: #107c10;
}

.step-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    flex-shrink: 0;
    transition: all 0.3s;
    z-index: 1;
}

.progress-step.active .step-indicator {
    background: #fff;
    border-color: #107c10;
    color: #107c10;
    box-shadow: 0 0 0 4px rgba(16, 124, 16, 0.15);
}

.progress-step.completed .step-indicator {
    background: #107c10;
    border-color: #107c10;
    color: white;
}

.step-content {
    flex: 1;
}

.step-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.progress-step.active .step-label {
    color: #107c10;
}

.progress-step.completed .step-label {
    color: #6b7280;
}

.step-status {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

.progress-step.active .step-status {
    color: #107c10;
}

.retry-section,
.retry-section-modal {
    text-align: center;
    padding: 20px 0;
}

.retry-icon,
.retry-icon-modal {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: #856404;
}

.retry-message,
.retry-message-modal {
    color: #666;
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.retry-message strong,
.retry-message-modal strong {
    color: #d13438;
    font-size: 18px;
    display: block;
    margin-bottom: 4px;
}

.retry-buttons,
.retry-buttons-modal {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.retry-btn,
.retry-btn-modal {
    padding: 14px 28px;
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.retry-btn:hover,
.retry-btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cancel-btn,
.cancel-btn-modal {
    padding: 14px 28px;
    background: transparent;
    color: #666;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn:hover,
.cancel-btn-modal:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

/* Confirmation Modal Left Side */
.confirm-left-content {
    color: white;
}

.confirm-left-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(16, 124, 16, 0.2) 0%, transparent 50%);
}

.receipt-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    z-index: 1;
}

.receipt-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.receipt-badge {
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a1a;
}

.amount-display {
    text-align: center;
    margin-bottom: 30px;
    z-index: 1;
}

.amount-display .currency {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.amount-display .amount-value {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.order-breakdown,
.bill-breakdown {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 20px;
    z-index: 1;
    color: #1a1a1a;
}

.breakdown-row,
.bill-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.breakdown-row:last-child,
.bill-breakdown-item:last-child {
    border-bottom: none;
}

.customer-info-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.customer-info-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-info-card h4 i {
    color: #107c10;
}

.customer-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.customer-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.customer-info-item:first-child {
    padding-top: 0;
}

.customer-info-item .label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.customer-info-item .value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.security-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.security-badges .badge {
    flex: 1;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 10px;
    border-radius: 10px;
    font-size: 12px;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ussd-notice {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ussd-notice i {
    color: #d97706;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.confirm-cancel-btn {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    color: #666;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.confirm-cancel-btn:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.confirm-pay-btn {
    flex: 2;
    padding: 14px 24px;
    background: linear-gradient(135deg, #107c10 0%, #0e6b0e 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(16, 124, 16, 0.3);
}

.confirm-pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 124, 16, 0.4);
}

/* Mobile Responsive for Modals */
@media (max-width: 768px) {
    .payment-modal-content {
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
    }

    .payment-left {
        padding: 30px 20px;
    }

    .phone-mockup {
        width: 160px;
        height: 320px;
        border-radius: 28px;
    }

    .phone-screen {
        border-radius: 22px;
    }

    .payment-right {
        padding: 30px 24px;
    }

    .payment-header h3 {
        font-size: 22px;
    }

    .retry-buttons,
    .confirm-actions {
        flex-direction: column;
    }

    .confirm-cancel-btn,
    .confirm-pay-btn {
        flex: none;
    }
}