/* Custom styles for POSmaxx - KPN Styling */

body {
    background-color: #ffffff;
    font-family: 'KPN UI Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Navbar styling */
.navbar {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb;
}

.navbar-brand {
    font-weight: 600;
    color: #1a1a1a;
}

.navbar-logo {
    height: 45px;
    width: auto;
}

.brand-text {
    color: #00C300;
    font-weight: 700;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-logo {
        height: 28px;
    }
    
    .brand-text {
        font-size: 1.25rem;
    }
}

.container-fluid {
    background: #f8fafc;
}

/* Mobile-first fullscreen */
@media (max-width: 768px) {
    html {
        height: 100%;
        height: -webkit-fill-available;
    }
    
    body {
        overflow-x: hidden;
    }
    
    .container-fluid {
        background: #ffffff;
        padding: 0;
    }
}

/* Test Mode Toggle (Bottom) */
.test-mode-bottom {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 90%;
}

@media (max-width: 768px) {
    .test-mode-bottom {
        display: none;
    }
}

.test-mode-bottom:hover {
    opacity: 1;
}

.test-mode-bottom .form-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.test-mode-bottom .form-check-input {
    width: 2.5rem;
    height: 1.25rem;
    cursor: pointer;
}

.test-mode-bottom .form-check-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    margin-left: 10px;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #00C300;
    border-color: #00C300;
}

.form-check-input:not(:checked) {
    background-color: #e53e3e;
    border-color: #e53e3e;
}

.form-check-label {
    font-weight: 600;
    color: #495057;
    cursor: pointer;
}

#testModeLabel {
    font-size: 1rem;
    margin-left: 8px;
}

/* Navbar Styling */
.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.navbar-logo {
    height: 32px;
    width: auto;
}

.brand-text {
    font-weight: 700;
    color: #00C300;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.border-bottom {
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Card Styling */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 16px 16px 0 0 !important;
    padding: 24px 32px !important;
}

.card-header h4 {
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.card-header .text-muted {
    color: #64748b !important;
    font-size: 0.95rem;
    margin-top: 4px;
}

.card-body {
    padding: 32px !important;
}

/* Button Styling */
.btn-primary {
    background: linear-gradient(135deg, #00C300 0%, #00A000 100%);
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 195, 0, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00A000 0%, #005500 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 195, 0, 0.4);
}

.btn-primary:disabled {
    background: #e2e8f0;
    color: #9ca3af;
    transform: none;
    box-shadow: none;
}

/* Payment Section */
.payment-section h6 {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Page Container */
.page-container {
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .page-container {
        min-height: auto;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        display: flex;
        flex-direction: column;
    }
}

/* Product Selection Wrapper */
.product-selection-wrapper {
    background: #ffffff;
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .product-selection-wrapper {
        padding: calc(env(safe-area-inset-top) + 2rem) 1rem calc(env(safe-area-inset-bottom) + 2.5rem);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
}

/* Confirmation Wrapper */
.confirmation-wrapper {
    background: #ffffff;
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .confirmation-wrapper {
        padding: calc(env(safe-area-inset-top) + 1.5rem) 1rem calc(env(safe-area-inset-bottom) + 1.5rem);
        overflow-y: auto;
    }
}

/* Tap to Pay Full Screen */
.tap-to-pay-fullscreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #00C300 0%, #00A000 100%);
    border-radius: 20px;
}

@media (max-width: 768px) {
    .tap-to-pay-fullscreen {
        min-height: auto;
        border-radius: 0;
        padding: calc(env(safe-area-inset-top) + 5rem) 20px calc(env(safe-area-inset-bottom) + 5rem);
        justify-content: center;
    }
}

.tap-to-pay-container {
    text-align: center;
    color: white;
}

.tap-to-pay-header {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.tap-to-pay-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .tap-to-pay-header {
        font-size: 2.75rem;
    }
    
    .tap-to-pay-subtitle {
        font-size: 1.1rem;
    }
}

.tap-to-pay-amount {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 32px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tap-pay-button {
    background: white;
    color: #00C300;
    border: none;
    padding: 16px 48px;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tap-pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
    color: #00C300;
}

.tap-pay-button:active {
    transform: translateY(0);
}

.tap-icon {
    font-size: 1.5rem;
    margin-right: 8px;
}

/* Payment Processing Animation */
.processing-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e7f3ff 100%);
    border-radius: 16px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: #00C300;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

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

.processing-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}


/* Amount Options */
.amount-option {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-weight: 700;
    color: #1a1a1a;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-size: 1.125rem;
}

.amount-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 195, 0, 0.15);
    border-color: #00C300;
}

.amount-option.selected {
    background: linear-gradient(135deg, #00C300 0%, #00A000 100%);
    border-color: #00C300;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 195, 0, 0.3);
}


.selected-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.selected-icon {
    font-size: 3rem;
    line-height: 1;
}

.selected-details {
    text-align: left;
}

.selected-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00C300;
}

.selected-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00C300;
}


/* Payment section */
.payment-section {
    /* Removed border and padding for tighter layout */
}


/* Payment status and result */
.payment-status .alert {
    border-radius: 10px;
    border: none;
}

.payment-result .alert-success {
    background: linear-gradient(135deg, #e6ffe6 0%, #b3ffb3 100%);
    border-radius: 16px;
    border: 2px solid #00C300;
    box-shadow: 0 4px 20px rgba(0, 195, 0, 0.15);
}

.payment-result .alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
    border-radius: 10px;
    border: none;
}


.intent-log {
    background-color: #212529;
    color: #00ff00;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    max-height: 300px;
    overflow-y: auto;
}

/* Transaction details */
.transaction-details {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .transaction-details {
        padding: 12px;
        margin-top: 12px;
    }
    
    .qr-section {
        margin: 12px 0;
        padding: 16px;
    }
    
    .qr-container canvas,
    .qr-container img {
        max-width: 250px;
        max-height: 250px;
        width: 250px !important;
        height: 250px !important;
    }
}

.transaction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.transaction-row:last-child {
    border-bottom: none;
}

.transaction-label {
    font-weight: 600;
    color: #495057;
}

.transaction-value {
    color: #212529;
    font-family: 'Courier New', monospace;
}

/* Phone Top-Up Section */
.phone-input-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.phone-input-section .form-label {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.phone-input-section input[type="tel"] {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.phone-input-section input[type="tel"]:focus {
    border-color: #00C300;
    box-shadow: 0 0 0 3px rgba(0, 195, 0, 0.1);
    outline: none;
}

.validation-message .alert {
    margin: 0;
    font-size: 0.875rem;
}

.product-type-selector .btn-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.product-type-selector .btn {
    padding: 12px 20px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    transition: all 0.3s ease;
}

.product-type-selector .btn-outline-primary {
    color: #64748b;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
}

.product-type-selector .btn-outline-primary:hover {
    color: #00C300;
    background: #f8fafc;
}

.product-type-selector .btn-outline-primary.active {
    background: linear-gradient(135deg, #00C300 0%, #00A000 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 195, 0, 0.3);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .amount-option {
        padding: 16px 8px;
        font-size: 1rem;
        min-height: 60px;
    }
    
    .price-amount {
        font-size: 1.5rem;
    }
    
    .btn-primary {
        padding: 12px;
        font-size: 1rem;
    }
    
    .product-type-selector .btn {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}


/* QR Code Section */
.qr-section {
    margin: 15px 0;
    padding: 18px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 10px;
    border: 1px solid #dee2e6;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qr-label {
    color: #495057;
    font-weight: 600;
    margin-bottom: 10px;
}

.qr-container {
    display: inline-block;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .qr-container {
        padding: 8px;
    }
}

.qr-container canvas,
.qr-container img {
    display: block;
    border-radius: 4px;
    width: 250px !important;
    height: 250px !important;
}

/* Success animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}