/**
 * GIL Buy Online Checkout Portal Stylesheet
 * Brand color: Indigo / Purple gradient with slate accents.
 */

:root {
    --gil-primary: #4f46e5;
    --gil-primary-hover: #4338ca;
    --gil-primary-glow: rgba(79, 70, 229, 0.15);
    --gil-secondary: #0ea5e9;
    --gil-success: #10b981;
    --gil-success-hover: #059669;
    --gil-danger: #ef4444;
    --gil-warning: #f59e0b;
    
    --gil-bg-card: #ffffff;
    --gil-bg-body: #f8fafc;
    --gil-border: #e2e8f0;
    --gil-text-main: #0f172a;
    --gil-text-muted: #64748b;
    --gil-font-title: 'Outfit', 'Inter', sans-serif;
    --gil-font-body: 'Inter', sans-serif;
    --gil-radius: 16px;
    --gil-radius-sm: 8px;
    --gil-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --gil-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --gil-airtel-color: #ff0000;
    --gil-tnm-color: #009933;
}

/* Base Wrapper styling */
.gil-portal-wrapper {
    font-family: var(--gil-font-body);
    color: var(--gil-text-main);
    background-color: var(--gil-bg-body);
    padding: 2.5rem 1.5rem;
    border-radius: var(--gil-radius);
    box-shadow: var(--gil-shadow);
    max-width: 1100px;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
    line-height: 1.5;
}

.gil-portal-wrapper *, .gil-portal-wrapper *::before, .gil-portal-wrapper *::after {
    box-sizing: border-box;
}

/* Header */
.gil-portal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gil-portal-title {
    font-family: var(--gil-font-title);
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

.gil-portal-subtitle {
    color: var(--gil-text-muted);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
}

/* Progress Step Wizard */
.gil-wizard-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 0 auto 3rem auto;
    max-width: 800px;
    padding: 0 10px;
}

.gil-progress-track {
    position: absolute;
    top: 20px;
    left: 5%;
    right: 5%;
    height: 4px;
    background-color: var(--gil-border);
    z-index: 1;
    border-radius: 2px;
}

.gil-progress-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
    cursor: default;
}

.gil-step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 3px solid var(--gil-border);
    color: var(--gil-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--gil-font-title);
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.gil-step-label {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gil-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

/* Step States */
.gil-progress-step.active .gil-step-circle {
    border-color: var(--gil-primary);
    background-color: var(--gil-primary);
    color: #ffffff;
    box-shadow: 0 0 0 5px var(--gil-primary-glow);
}

.gil-progress-step.active .gil-step-label {
    color: var(--gil-primary);
}

.gil-progress-step.completed .gil-step-circle {
    border-color: var(--gil-success);
    background-color: var(--gil-success);
    color: #ffffff;
}

.gil-progress-step.completed .gil-step-label {
    color: var(--gil-success);
}

/* Content Panels */
.gil-step-pane {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.gil-step-pane.active {
    display: block;
}

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

/* Sleek Cards */
.gil-card {
    background-color: var(--gil-bg-card);
    border: 1px solid var(--gil-border);
    border-radius: var(--gil-radius);
    padding: 2.5rem;
    box-shadow: var(--gil-shadow);
    margin-bottom: 2rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.gil-card:hover {
    border-color: rgba(79, 70, 229, 0.3);
}

.gil-card-title {
    font-family: var(--gil-font-title);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--gil-text-main);
}

.gil-card-description {
    color: var(--gil-text-muted);
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Inputs and Forms */
.gil-input-group {
    margin-bottom: 1.5rem;
}

.gil-input-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--gil-text-main);
}

.gil-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.gil-text-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem !important;
    font-family: var(--gil-font-body);
    font-size: 1rem;
    border: 1px solid var(--gil-border);
    border-radius: var(--gil-radius-sm);
    background-color: #ffffff;
    transition: all 0.3s ease;
    color: var(--gil-text-main);
}

.gil-text-input:focus {
    outline: none;
    border-color: var(--gil-primary);
    box-shadow: 0 0 0 4px var(--gil-primary-glow);
}

.gil-text-input::placeholder {
    color: var(--gil-text-muted);
    opacity: 0.6;
}

.gil-input-icon {
    position: absolute;
    left: 1rem;
    color: var(--gil-text-muted);
    pointer-events: none;
    transition: color 0.3s ease;
}

.gil-text-input:focus + .gil-input-icon {
    color: var(--gil-primary);
}

/* Input Addon Prefix */
.gil-input-addon {
    background-color: var(--gil-bg-body);
    border: 1px solid var(--gil-border);
    border-right: none;
    padding: 0.85rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    border-top-left-radius: var(--gil-radius-sm);
    border-bottom-left-radius: var(--gil-radius-sm);
    color: var(--gil-text-main);
    user-select: none;
}

.gil-text-input.addon-left {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding-left: 1rem;
}

.gil-input-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--gil-text-muted);
}

/* Buttons */
.gil-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    font-family: var(--gil-font-title);
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--gil-radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.gil-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gil-btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
}

.gil-btn-primary:not(:disabled):hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.4);
}

.gil-btn-secondary {
    background-color: #ffffff;
    border: 1px solid var(--gil-border);
    color: var(--gil-text-main);
}

.gil-btn-secondary:hover {
    background-color: var(--gil-bg-body);
    border-color: var(--gil-text-muted);
}

.gil-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.3);
}

.gil-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.4);
}

/* Spinner inside button */
.gil-btn-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    margin-left: 0.75rem;
}

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

.hidden {
    display: none !important;
}

/* Alert Boxes */
.gil-alert-box {
    display: none;
    padding: 1rem 1.5rem;
    border-radius: var(--gil-radius-sm);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    animation: slideDown 0.3s ease forwards;
}

.gil-alert-box.danger {
    display: block;
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: var(--gil-danger);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Verified Profile Box */
.gil-profile-card {
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border: 1px dashed var(--gil-primary);
    border-radius: var(--gil-radius-sm);
    padding: 1.5rem;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    animation: pulseBorder 2s infinite alternate;
}

@keyframes pulseBorder {
    0% { border-color: rgba(79, 70, 229, 0.4); }
    100% { border-color: rgba(79, 70, 229, 1); }
}

.gil-profile-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gil-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    font-family: var(--gil-font-title);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.gil-profile-text h4 {
    margin: 0 0 0.25rem 0;
    font-family: var(--gil-font-title);
    font-size: 1.15rem;
    font-weight: 700;
}

.gil-profile-meta {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.gil-badge-grp {
    background-color: #e0e7ff;
    color: var(--gil-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 600;
}

.gil-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--gil-success);
    font-weight: 600;
}

.gil-status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--gil-success);
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.5s infinite ease-in-out;
}

@keyframes blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.gil-btn-row-right {
    display: flex;
    justify-content: flex-end;
}

.gil-arrow-icon {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.gil-btn-to-packages:hover .gil-arrow-icon {
    transform: translateX(4px);
}

/* STEP 2: PACKAGE CONTAINER & CARDS */
.gil-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.gil-step-title {
    font-family: var(--gil-font-title);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.gil-step-description {
    color: var(--gil-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.gil-package-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

/* Premium Package Compact List Card Design */
.gil-pkg-card {
    background-color: #ffffff;
    border: 1px solid var(--gil-border);
    border-radius: var(--gil-radius-sm);
    padding: 1rem 1.25rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    overflow: hidden;
}

.gil-pkg-card:hover {
    border-color: var(--gil-primary);
    background-color: var(--gil-primary-glow);
}

.gil-pkg-card.selected {
    border-color: var(--gil-primary);
    background-color: var(--gil-primary-glow);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

/* selection radio indicator styling */
.gil-pkg-selection {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gil-pkg-radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gil-border);
    background-color: #ffffff;
    position: relative;
    transition: all 0.2s ease;
}

.gil-pkg-card.selected .gil-pkg-radio-circle {
    border-color: var(--gil-primary);
}

.gil-pkg-card.selected .gil-pkg-radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--gil-primary);
}

.gil-pkg-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.gil-pkg-name-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.gil-pkg-name {
    font-family: var(--gil-font-title);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--gil-text-main);
}

.gil-pkg-badge {
    background-color: var(--gil-primary-glow);
    color: var(--gil-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.gil-pkg-meta-text {
    font-size: 0.875rem;
    color: var(--gil-text-muted);
    line-height: 1.4;
}

.gil-pkg-meta-text strong {
    color: var(--gil-text-main);
    font-weight: 600;
}

.gil-pkg-pricing {
    flex-shrink: 0;
    text-align: right;
}

.gil-price-val {
    font-family: var(--gil-font-title);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gil-primary);
}

/* Mobile responsive compact list styling */
@media (max-width: 600px) {
    .gil-pkg-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1.25rem;
    }
    
    .gil-pkg-selection {
        position: absolute;
        top: 1.25rem;
        right: 1.25rem;
    }
    
    .gil-pkg-pricing {
        width: 100%;
        text-align: left;
        border-top: 1px solid var(--gil-border);
        padding-top: 0.75rem;
        margin-top: 0.25rem;
    }
}

/* Wizard Navigation Row */
.gil-wizard-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    border-top: 1px solid var(--gil-border);
    padding-top: 1.5rem;
}

.gil-wizard-navigation.gateway-nav {
    margin-top: 1.5rem;
}

/* STEP 3: BILLING & PAYMENT LAYOUT */
.gil-billing-layout {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr;
    gap: 2rem;
}

@media (max-width: 868px) {
    .gil-billing-layout {
        grid-template-columns: 1fr;
    }
}

.gil-billing-card {
    height: 100%;
}

.gil-summary-block {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.gil-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.gil-summary-label {
    color: var(--gil-text-muted);
}

.gil-summary-val {
    font-weight: 600;
    color: var(--gil-text-main);
}

.gil-summary-row.highlight .gil-summary-label {
    font-weight: 700;
    color: var(--gil-text-main);
    font-size: 1.1rem;
}

.gil-summary-row.highlight .gil-summary-val {
    font-family: var(--gil-font-title);
    font-weight: 800;
    color: var(--gil-primary);
    font-size: 1.15rem;
}

.gil-summary-row.sub-meta {
    font-size: 0.85rem;
    margin-top: -0.35rem;
}

.gil-divider {
    height: 1px;
    background-color: var(--gil-border);
    margin: 1.5rem 0;
}

.gil-summary-block.total-block {
    gap: 0.6rem;
}

.gil-summary-block.total-block .grand-total {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gil-border);
}

.gil-summary-block.total-block .grand-total .gil-summary-label {
    font-weight: 700;
    color: var(--gil-text-main);
    font-size: 1.05rem;
}

.gil-summary-block.total-block .grand-total .gil-summary-val {
    font-family: var(--gil-font-title);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gil-primary);
}

/* Payment Gateways Selection */
.gil-gateways-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.gil-gateway-option {
    cursor: pointer;
}

.gil-gateway-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gil-gateway-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gil-border);
    border-radius: var(--gil-radius-sm);
    padding: 1.25rem 0.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
    height: 100%;
}

.gil-gateway-option.active .gil-gateway-box,
.gil-gateway-radio:checked + .gil-gateway-box {
    border-color: var(--gil-primary);
    background-color: var(--gil-primary-glow);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.05);
}

/* Gateway Logos */
.gil-gateway-logo {
    height: 32px;
    width: 100%;
    margin-bottom: 0.5rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

/* Custom CSS representation of logos */
.gil-gateway-logo.visa {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="5" width="20" height="14" rx="2" stroke="%234f46e5" stroke-width="2"/><line x1="2" y1="10" x2="22" y2="10" stroke="%234f46e5" stroke-width="2"/><rect x="5" y="14" width="4" height="2" fill="%230ea5e9"/></svg>');
    position: relative;
}

.gil-gateway-logo.airtel {
    position: relative;
}
.gil-gateway-logo.airtel::after {
    content: 'airtel';
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--gil-airtel-color);
    font-size: 1.1rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.gil-gateway-logo.tnm {
    position: relative;
}
.gil-gateway-logo.tnm::after {
    content: 'mpamba';
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--gil-tnm-color);
    font-size: 1rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.gil-gateway-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--gil-text-main);
}

.gil-gateway-form {
    display: none;
    animation: fadeIn 0.3s ease forwards;
}

.gil-gateway-form.active {
    display: block;
}

.gil-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.gil-card-type-icon {
    position: absolute;
    right: 1rem;
    width: 32px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* STEP 5: SUCCESS PANEL & CREDENTIALS */
.gil-success-animation-container {
    text-align: center;
    margin-bottom: 3rem;
}

.gil-success-icon-box {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.gil-success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--gil-success);
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--gil-success);
    animation: fillSuccess 0.4s ease-in-out 0.4s forwards, scaleSuccess 0.3s ease-in-out 0.9s alternate both;
}

.gil-success-checkmark-circle {
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-miterlimit: 10;
    stroke: var(--gil-success);
    fill: none;
    animation: strokeCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.gil-success-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: strokeCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes strokeCircle {
    100% { stroke-dashoffset: 0; }
}
@keyframes strokeCheck {
    100% { stroke-dashoffset: 0; }
}
@keyframes fillSuccess {
    100% { box-shadow: inset 0px 0px 0px 40px rgba(16, 185, 129, 0.1); }
}
@keyframes scaleSuccess {
    0% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
    100% { transform: none; }
}

.gil-success-title {
    font-family: var(--gil-font-title);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gil-success);
    margin: 0 0 0.5rem 0;
}

.gil-success-message {
    color: var(--gil-text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.gil-receipt-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 868px) {
    .gil-receipt-layout {
        grid-template-columns: 1fr;
    }
}

.gil-receipt-card {
    padding: 2rem;
    border-style: solid;
    border-width: 1px;
}

.gil-receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.gil-receipt-brand {
    font-family: var(--gil-font-title);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--gil-primary);
}

.gil-receipt-stamp {
    border: 2px solid var(--gil-success);
    color: var(--gil-success);
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    transform: rotate(-10deg);
}

.gil-receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.gil-receipt-table th, .gil-receipt-table td {
    padding: 0.75rem 0;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--gil-border);
}

.gil-receipt-table th {
    text-align: left;
    color: var(--gil-text-muted);
    font-weight: 500;
}

.gil-receipt-table td {
    text-align: right;
    font-weight: 600;
    color: var(--gil-text-main);
}

.gil-receipt-table tr.gil-receipt-total-row th,
.gil-receipt-table tr.gil-receipt-total-row td {
    border-bottom: none;
    padding-top: 1rem;
}

.gil-receipt-table tr.gil-receipt-total-row th {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gil-text-main);
}

.gil-receipt-table tr.gil-receipt-total-row td {
    font-family: var(--gil-font-title);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gil-success);
}

.gil-receipt-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--gil-text-muted);
    margin-top: 1rem;
    border-top: 1px dashed var(--gil-border);
    padding-top: 1rem;
}

.gil-receipt-footer p {
    margin: 0;
}

/* Credentials styling */
.gil-credentials-card {
    border-color: rgba(16, 185, 129, 0.4);
    background-color: rgba(16, 185, 129, 0.02);
}

.gil-credentials-box {
    background-color: #ffffff;
    border: 1px solid var(--gil-border);
    border-radius: var(--gil-radius-sm);
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.gil-credential-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.gil-credential-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--gil-text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.gil-credential-val-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--gil-bg-body);
    border: 1px solid var(--gil-border);
    padding: 0.6rem 0.85rem;
    border-radius: var(--gil-radius-sm);
}

.gil-credential-value {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--gil-text-main);
}

.gil-credential-value.font-monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
}

.gil-credential-value.text-small {
    font-size: 0.9rem;
    font-weight: 600;
}

.gil-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gil-text-muted);
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.gil-copy-btn:hover {
    color: var(--gil-primary);
}

.gil-credential-help {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gil-text-muted);
    line-height: 1.4;
}

.gil-credential-help a {
    color: var(--gil-primary);
    text-decoration: underline;
    font-weight: 600;
}

.gil-credential-help .inline-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.gil-success-footer-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    border-top: 1px solid var(--gil-border);
    padding-top: 2rem;
}

.btn-icon-svg {
    margin-right: 0.5rem;
}

.text-center { text-align: center; }

/* MODALS - GLASSMORPHISM */
.gil-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.gil-modal-overlay.active {
    display: flex;
}

.gil-modal-box {
    background-color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--gil-radius);
    padding: 3rem 2.5rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gil-modal-spinner-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Beautiful Custom Spinner */
.gil-loading-ring {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}
.gil-loading-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 4px solid var(--gil-primary);
    border-radius: 50%;
    animation: gil-loading-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--gil-primary) transparent transparent transparent;
}
.gil-loading-ring div:nth-child(1) { animation-delay: -0.45s; }
.gil-loading-ring div:nth-child(2) { animation-delay: -0.3s; }
.gil-loading-ring div:nth-child(3) { animation-delay: -0.15s; }

@keyframes gil-loading-ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gil-modal-title {
    font-family: var(--gil-font-title);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: var(--gil-text-main);
}

.gil-modal-text {
    color: var(--gil-text-muted);
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* USSD Phone Call Ringing Wave Animations */
.gil-modal-phone-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.gil-phone-svg-container {
    position: relative;
    width: 80px;
    height: 80px;
    background-color: var(--gil-primary-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gil-primary);
}

.gil-phone-icon-svg {
    z-index: 3;
    animation: vibrate 0.5s infinite alternate;
}

@keyframes vibrate {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}

.gil-pulse-ring {
    border: 2px solid var(--gil-primary);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    opacity: 0;
    z-index: 1;
}

.gil-pulse-ring.ring-1 {
    animation: pulseWave 1.8s infinite linear;
}
.gil-pulse-ring.ring-2 {
    animation: pulseWave 1.8s infinite linear 0.6s;
}

@keyframes pulseWave {
    0% {
        transform: scale(0.9);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Circular Countdown Animation */
.gil-countdown-circle-container {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 1.5rem auto;
}

.gil-countdown-svg {
    width: 90px;
    height: 90px;
    transform: rotate(-90deg);
}

.gil-countdown-circle-bg {
    fill: none;
    stroke: var(--gil-border);
    stroke-width: 6;
}

.gil-countdown-circle-bar {
    fill: none;
    stroke: var(--gil-primary);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 251.2; /* 2 * PI * r (r=40) */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.gil-countdown-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--gil-font-title);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--gil-text-main);
}

/* Linear Status Progress bar inside modal */
.gil-modal-progress-container {
    background-color: var(--gil-border);
    border-radius: 4px;
    height: 6px;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.gil-modal-progress-bar {
    background: linear-gradient(to right, var(--gil-primary), var(--gil-secondary));
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.gil-modal-progress-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gil-text-muted);
    margin-top: 0.5rem;
}

.gil-modal-cancel-btn {
    background: none;
    border: none;
    color: var(--gil-danger);
    font-weight: 700;
    cursor: pointer;
    font-family: var(--gil-font-title);
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    transition: opacity 0.2s ease;
}

.gil-modal-cancel-btn:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* PRINTING MEDIA OVERRIDES */
@media print {
    @page {
        size: auto;
        margin: 15mm 0mm;
    }

    /* Force background colors and text colors to render exactly as styled */
    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        height: 100% !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide all elements on the page by default */
    body * {
        visibility: hidden !important;
    }
    
    /* Make the printable receipt card and its children visible */
    #gil-printable-receipt,
    #gil-printable-receipt * {
        visibility: visible !important;
    }

    /* Collapse all elements outside the receipt to 0 height/space and remove positioning contexts */
    body *:not(#gil-printable-receipt):not(#gil-printable-receipt *) {
        position: static !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        height: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        overflow: visible !important;
    }

    /* Position the receipt beautifully at the top center of the page */
    #gil-printable-receipt {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        max-width: 520px !important;
        height: auto !important;
        border: 1px solid #111111 !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        padding: 2.5rem !important;
        margin: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
        box-sizing: border-box !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        page-break-inside: avoid !important;
    }

    /* Print styling resets for receipt elements to look clean and high-contrast */
    .gil-receipt-brand {
        color: #000000 !important;
        font-size: 1.5rem !important;
        font-weight: 800 !important;
    }

    .gil-receipt-stamp {
        border: 2px solid #000000 !important;
        color: #000000 !important;
        background: transparent !important;
        padding: 0.2rem 0.75rem !important;
        font-weight: 800 !important;
        font-size: 0.95rem !important;
        border-radius: 6px !important;
        transform: rotate(-10deg) !important;
    }

    .gil-receipt-table {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .gil-receipt-table th {
        color: #444444 !important;
        border-bottom: 1px solid #dddddd !important;
        padding: 0.75rem 0 !important;
        font-weight: 600 !important;
        text-align: left !important;
    }

    .gil-receipt-table td {
        color: #000000 !important;
        border-bottom: 1px solid #dddddd !important;
        padding: 0.75rem 0 !important;
        font-weight: 600 !important;
        text-align: right !important;
    }

    .gil-receipt-table tr.gil-receipt-total-row th {
        border-bottom: none !important;
        padding-top: 1.5rem !important;
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        color: #000000 !important;
    }

    .gil-receipt-table tr.gil-receipt-total-row td {
        color: #000000 !important;
        border-bottom: none !important;
        padding-top: 1.5rem !important;
        font-size: 1.45rem !important;
        font-weight: 800 !important;
    }

    .gil-receipt-footer {
        margin-top: 2rem !important;
        padding-top: 1.5rem !important;
        border-top: 1px dashed #cccccc !important;
        text-align: center !important;
        font-size: 0.85rem !important;
        color: #555555 !important;
    }
}

