/* ========================================================
   Mobilize Financial Services & Credinissan Payment Portal
   ======================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #000000;
    --accent-red: #c3002f;
    --accent-orange: #f37021;
    --bg-gray: #f0f0f0;
    --card-bg: #ffffff;
    --input-gray: #e9ecef;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #ced4da;
    --font-main: 'Poppins', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-gray);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Brand area: exact match to the official Mobilize Financial Services header */
.portal-brand-bar {
    width: 100%;
    background: #ffffff;
    padding: 12px 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.portal-brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    max-width: 950px;
    margin: 0 auto;
    width: 100%;
}

.brand-logo {
    display: block;
    height: 38px;
    width: auto;
    cursor: pointer;
}

/* Main Container */
.payment-zone-wrapper {
    flex: 1;
    padding: 10px 20px 35px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.payment-zone {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
}

/* Step container transitions */
.step-pane {
    display: none;
    animation: fadeIn 0.35s ease-in-out forwards;
}

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

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

/* Base Card */
.mat-card {
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 35px 30px;
    border: none;
}

/* Step 1: Search Credit Form */
.form-search-credit {
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
}

.form-search-credit h3 {
    font-size: 16px;
    font-weight: 400;
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.5;
}

.form-group-outline {
    position: relative;
    margin-bottom: 25px;
    text-align: left;
}

.form-group-outline label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.form-group-outline input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-family: inherit;
    border: 1.5px solid #d0d7de;
    border-radius: 6px;
    background: #fff;
    outline: none;
    transition: all 0.2s ease;
}

.form-group-outline input:focus {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.btn-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 25px;
}

.btn-portal {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-portal-primary {
    background-color: #e0e0e0;
    color: #333333;
}

.btn-portal-primary:hover {
    background-color: #d0d0d0;
}

.btn-portal-accent {
    background-color: #111111;
    color: #ffffff;
}

.btn-portal-accent:hover {
    background-color: #333333;
}

.btn-portal-red {
    background-color: var(--accent-red);
    color: #ffffff;
}

.btn-portal-red:hover {
    background-color: #a00026;
}

/* Step 2: Summary */
.summary-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 25px;
    color: #212529;
}

.readonly-box {
    margin-bottom: 20px;
}

.readonly-box label {
    font-size: 13px;
    font-weight: 700;
    color: #666;
    display: block;
    margin-bottom: 6px;
}

.readonly-box input {
    width: 100%;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    cursor: default;
}

.payment-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

.payment-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
}

.payment-table th {
    background-color: #d3d3d3;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.payment-table td {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    vertical-align: middle;
}

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

.input-amount-wrapper input {
    width: 100%;
    padding: 10px 34px 10px 24px;
    font-size: 15px;
    font-weight: 700;
    border: 1.5px solid #ced4da;
    border-radius: 4px;
    outline: none;
    text-align: left;
}

.input-amount-wrapper input:focus {
    border-color: #111;
}

.input-amount-wrapper .currency-prefix {
    position: absolute;
    left: 10px;
    font-weight: 700;
    color: #495057;
}

.input-amount-wrapper .tooltip-icon {
    position: absolute;
    right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.input-amount-wrapper .tooltip-icon:hover {
    opacity: 1;
}

.total-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px 0;
}

.total-row .total-label {
    font-size: 18px;
    font-weight: 700;
}

.total-row .total-value-pill {
    background-color: #d3d3d3;
    padding: 8px 24px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.payment-method-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin: 20px 0;
}

.payment-method-box input[type="checkbox"] {
    accent-color: #111;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.payment-method-box label {
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ========================================================
   Step 3: CHECKOUT SCREEN (EXACT MATCH TO SCREENSHOT)
   ======================================================== */
.checkout-view-wrapper {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-top: 10px;
}

/* Vertical Vigilado Badge on Left */
.vigilado-vertical-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 5px;
}

.vigilado-vertical-badge {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #000000;
    letter-spacing: 0.5px;
    user-select: none;
}

.vigilado-vertical-badge .vigilado-box {
    border: 1.5px solid #000;
    padding: 3px 6px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.vigilado-vertical-badge .vigilado-text {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 9.5px;
    line-height: 1.2;
}

/* Checkout Card */
.checkout-main-card {
    flex: 1;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    overflow: hidden;
    min-height: 400px;
}

/* Left panel (grey) */
.checkout-left-panel {
    flex: 1.85;
    background-color: #e5e5e5;
    padding: 35px 28px;
    box-sizing: border-box;
}

.checkout-left-panel h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 24px;
    font-family: inherit;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 14px;
    width: 100%;
}

.checkout-grid .grid-col-full {
    grid-column: 1 / -1;
}

.checkout-grid .grid-row-3 {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.15fr 0.6fr 1.25fr;
    gap: 10px;
    width: 100%;
}

.checkout-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

.checkout-field label {
    font-size: 13px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-field input {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 9px 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #2b2b2b;
    outline: none;
    font-family: inherit;
    text-transform: uppercase;
    width: 100%;
    box-sizing: border-box;
}

.checkout-field input:focus {
    border-color: #111;
}

/* Right panel (white) */
.checkout-right-panel {
    flex: 1.15;
    background-color: #ffffff;
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.checkout-right-panel .checkout-amount-display {
    font-size: 32px;
    font-weight: 800;
    color: #000000;
    margin-bottom: 45px;
    letter-spacing: -0.5px;
}

.checkout-right-panel .checkout-amount-display span.currency-code {
    font-size: 22px;
    font-weight: 700;
    margin-left: 4px;
}

.checkout-right-panel .payment-methods-title {
    font-size: 18px;
    font-weight: 600;
    color: #111111;
    margin-bottom: 20px;
}

.checkout-right-panel .payment-methods-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-right-panel .btn-pse-pay,
.checkout-right-panel .btn-card-pay {
    width: 100%;
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.checkout-right-panel .btn-card-pay {
    background-color: #ffffff;
    color: #111111;
    border: 1px solid #111111;
}

.checkout-right-panel .btn-pse-pay:hover,
.checkout-right-panel .btn-card-pay:hover {
    transform: translateY(-1px);
}

.checkout-right-panel .btn-pse-pay:hover {
    background-color: #222222;
}

.checkout-right-panel .btn-card-pay:hover {
    background-color: #f5f5f5;
}

.checkout-right-panel .btn-pse-pay:active,
.checkout-right-panel .btn-card-pay:active {
    transform: translateY(0);
}

.payment-method-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 24px;
}

.payment-method-modal.show {
    display: flex;
}

.payment-method-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
}

.payment-method-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 1100px);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
    padding: 26px 28px 22px;
    border: 1px solid rgba(17, 17, 17, 0.08);
}

.payment-method-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f3f3f3;
    color: #111;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.payment-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 6px 44px 18px 0;
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 20px;
}

.payment-modal-kicker {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 6px;
}

.payment-modal-header h3 {
    font-size: clamp(22px, 2vw, 32px);
    color: #111;
    line-height: 1.2;
}

.payment-modal-total {
    font-size: clamp(22px, 2.1vw, 36px);
    font-weight: 800;
    color: #111;
    white-space: nowrap;
}

.payment-modal-body {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 22px;
}

.payment-modal-summary {
    background: #f6f6f6;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 18px 18px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 14px;
    color: #444;
    border-bottom: 1px solid #ececec;
    padding-bottom: 10px;
}

.summary-line:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.summary-line strong {
    color: #111;
    text-align: right;
    font-weight: 700;
}

.summary-line.total {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    padding-top: 8px;
}

.payment-method-forms {
    display: block;
}

.payment-form-panel {
    display: none;
}

.payment-form-panel.active {
    display: block;
}

.method-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.method-row {
    display: flex;
    gap: 14px;
}

.method-row.two-cols > .form-group {
    flex: 1;
}

.radio-row {
    padding-bottom: 4px;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    color: #222;
    font-weight: 500;
    cursor: pointer;
}

.radio-option input {
    accent-color: #111;
    width: 16px;
    height: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.method-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 14px;
    color: #111;
    font-family: inherit;
    outline: none;
}

.method-input:focus {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

.method-submit-btn {
    margin-top: 8px;
    width: 100%;
    background: #111111;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.method-submit-btn-light {
    background: #ffffff;
    color: #111111;
    border: 1px solid #111111;
}

@media (max-width: 860px) {
    .portal-brand-bar {
        padding: 14px 20px 0;
    }
    .brand-logo {
        height: 72px;
    }
    .checkout-view-wrapper {
        flex-direction: column;
    }
    .vigilado-vertical-container {
        writing-mode: horizontal-tb;
        transform: none;
        padding-bottom: 10px;
    }
    .vigilado-vertical-badge {
        writing-mode: horizontal-tb;
        transform: none;
        flex-direction: row;
    }
    .checkout-main-card {
        flex-direction: column;
    }
    .checkout-left-panel, .checkout-right-panel {
        flex: auto;
        padding: 25px 20px;
    }
    .checkout-grid .grid-row-3 {
        grid-template-columns: 1fr;
    }
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    .mat-card {
        padding: 25px 20px;
    }
    .checkout-right-panel .checkout-amount-display {
        margin-bottom: 25px;
        font-size: 26px;
    }
    .payment-modal-body {
        grid-template-columns: 1fr;
    }
    .payment-modal-header {
        flex-direction: column;
        padding-right: 30px;
    }
    .payment-modal-total {
        white-space: normal;
    }
}

/* Legal Footer */
.portal-legal-section {
    max-width: 980px;
    margin: 40px auto 20px;
    padding: 0 20px;
    font-size: 12.5px;
    color: #555555;
    line-height: 1.7;
    text-align: justify;
}

.portal-legal-section p {
    margin-bottom: 14px;
}

.portal-footer-banner {
    text-align: center;
    padding: 20px 0 40px;
}

.portal-footer-banner img {
    max-width: 100%;
    height: auto;
}

/* Spinner Overlay */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #ffffff;
}

.spinner-overlay.active {
    display: flex;
}

.spinner-ball {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}

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

.spinner-text {
    font-size: 15px;
    font-weight: 500;
}

/* Alert / Toast Bar */
.toast-alert {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #323232;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 99999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-alert.show {
    transform: translateX(-50%) translateY(0);
}

.toast-alert .toast-close {
    background: transparent;
    border: none;
    color: #f37021;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 13px;
}

/* Tooltip Popup */
.tooltip-modal {
    position: fixed;
    background: #333;
    color: #fff;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 12px;
    max-width: 260px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
    line-height: 1.4;
}

/* ========================================================
   RESPONSIVE QUERIES
   ======================================================== */
@media (max-width: 860px) {
    .portal-brand-bar {
        padding: 14px 20px 0;
    }
    .brand-logo {
        height: 72px;
    }
    .checkout-view-wrapper {
        flex-direction: column;
    }
    .vigilado-vertical-container {
        writing-mode: horizontal-tb;
        transform: none;
        padding-bottom: 10px;
    }
    .vigilado-vertical-badge {
        writing-mode: horizontal-tb;
        transform: none;
        flex-direction: row;
    }
    .checkout-main-card {
        flex-direction: column;
    }
    .checkout-left-panel, .checkout-right-panel {
        flex: auto;
        padding: 25px 20px;
    }
    .checkout-grid .grid-row-3 {
        grid-template-columns: 1fr;
    }
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    .mat-card {
        padding: 25px 20px;
    }
    .checkout-right-panel .checkout-amount-display {
        margin-bottom: 25px;
        font-size: 26px;
    }
}
