﻿/* ========================================
   UNITENFPX
   ======================================== */

/* ========================================
   BASE STYLES
   ======================================== */
body {
    /*background-color: #C0E7FE;*/
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
}

/* ========================================
   LAYOUT CONTAINERS
   ======================================== */
.container {
    max-width: 750px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner {
    width: 100%;
    height: auto;
    display: block;
}

.page-title {
    color: #368DB4;
    font-size: 14px;
    padding: 15px;
    background-color: #f5f5f5;
    border-bottom: 2px solid #368DB4;
    font-weight: bold;
}

.content-section {
    padding: 20px;
}

/* ========================================
   TRANSACTION DETAILS (Confirm Page)
   ======================================== */
.transaction-details {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

    .transaction-details table {
        width: 100%;
        border-collapse: collapse;
    }

    .transaction-details th {
        background-color: #368DB4;
        color: white;
        padding: 12px;
        text-align: left;
        font-weight: 600;
    }

    .transaction-details td {
        padding: 10px 12px;
        border-bottom: 1px solid #eee;
    }

    .transaction-details tr:last-child td {
        border-bottom: none;
        font-weight: bold;
        background-color: #f9f9f9;
    }

    .transaction-details input[type="text"] {
        border: none;
        background: transparent;
        text-align: right;
        font-family: inherit;
        font-size: inherit;
        width: 100px;
        font-weight: inherit;
    }

/* ========================================
   PAYMENT SECTION (Confirm Page)
   ======================================== */
.payment-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    background-color: #fafafa;
}

.fpx-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

    .fpx-header h3 {
        margin: 0;
        font-size: 18px;
        color: #333;
        display: flex;
        align-items: center;
    }

.fpx-logo {
    height: 32px;
    margin: 0 8px;
    vertical-align: middle;
}

.amount-display {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

    .amount-display .label {
        color: #666;
        font-size: 14px;
        margin-bottom: 5px;
    }

    .amount-display .amount {
        font-size: 18px;
        font-weight: bold;
        color: #333;
    }

    .amount-display .reference {
        color: #999;
        font-size: 12px;
        margin-top: 5px;
    }

/* ========================================
   BANK SELECTION (Confirm Page)
   ======================================== */
.bank-selection {
    margin-bottom: 20px;
}

    .bank-selection label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #333;
        font-size: 14px;
    }

.bank-dropdown {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    font-family: inherit;
}

    .bank-dropdown:focus {
        outline: none;
        border-color: #368DB4;
        box-shadow: 0 0 0 2px rgba(54, 141, 180, 0.1);
    }

    .bank-dropdown option {
        padding: 10px;
    }

        .bank-dropdown option:disabled {
            color: #999;
            background-color: #f5f5f5;
        }

    .bank-dropdown optgroup {
        font-weight: bold;
        font-style: normal;
        color: #368DB4;
    }

.offline-indicator {
    color: #d9534f;
    font-style: italic;
    font-weight: normal;
}

/* ========================================
   LOADING STATES
   ======================================== */
.loading-banks {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #368DB4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* ========================================
   SUBMIT TO FPX PAGE STYLES
   ======================================== */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #368DB4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

.loading-title {
    color: #368DB4;
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.loading-subtitle {
    color: #666;
    font-size: 15px;
    margin: 0 0 40px 0;
}

.payment-info-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin: 0 auto 30px auto;
    max-width: 450px;
}

    .payment-info-card h4 {
        color: #368DB4;
        margin: 0 0 20px 0;
        font-size: 16px;
        font-weight: 600;
        text-align: center;
    }

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
}

    .info-row:last-child {
        border-bottom: none;
    }

.info-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

    .info-value.amount {
        color: #368DB4;
        font-size: 18px;
    }

/* Warning Box */
.warning-box {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 15px 20px;
    margin: 0 auto;
    max-width: 450px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.warning-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.warning-text {
    color: #856404;
    font-size: 14px;
    text-align: left;
    margin: 0;
    line-height: 1.5;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 40px 0 20px 0;
    flex-wrap: wrap;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #368DB4;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

    .step-circle.completed {
        background-color: #4caf50;
    }

    .step-circle.inactive {
        background-color: #ccc;
    }

.step-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.step-arrow {
    color: #ccc;
    font-size: 20px;
}

/* Security Notice */
.security-notice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 20px;
    padding: 10px 16px;
    margin-top: 30px;
    font-size: 13px;
    color: #2e7d32;
}

.security-icon {
    width: 18px;
    height: 18px;
}

/* ========================================
   PAYMENT RETURN PAGE STYLES
   ======================================== */
.result-container {
    text-align: center;
    /*padding: 40px 20px;*/
    padding: 10px 5px;
}

/* Status Icons */
.status-icon-container {
    margin-bottom: 25px;
}

.status-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 40px;
    animation: scaleIn 0.5s ease-out;
}

    .status-icon.success {
        background-color: #4caf50;
        color: white;
    }

    .status-icon.pending {
        background-color: #ff9800;
        color: white;
    }

    .status-icon.failed {
        background-color: #f44336;
        color: white;
    }

.status-title {
    /*font-size: 28px;*/
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

    .status-title.success {
        color: #4caf50;
    }

    .status-title.pending {
        color: #ff9800;
    }

    .status-title.failed {
        color: #f44336;
    }

.status-message {
    color: #666;
    font-size: 15px;
    /*margin: 0 0 30px 0;*/
    margin: 0 0 10px 0;
}

/* Transaction Card */
.transaction-card {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin: 0 auto 25px auto;
    max-width: 600px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

    .transaction-card h4 {
        color: #368DB4;
        margin: 0 0 20px 0;
        font-size: 16px;
        font-weight: 600;
        text-align: left;
        padding-bottom: 10px;
        border-bottom: 2px solid #368DB4;
    }

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

    .detail-row:last-child {
        border-bottom: none;
    }

.detail-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    flex: 0 0 45%;
}

.detail-value {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    flex: 0 0 55%;
    word-break: break-word;
}

    .detail-value.amount {
        color: #368DB4;
        font-size: 18px;
    }

    .detail-value.status {
        padding: 4px 12px;
        border-radius: 4px;
        display: inline-block;
        font-size: 13px;
    }

        .detail-value.status.success {
            background-color: #e8f5e9;
            color: #2e7d32;
        }

        .detail-value.status.pending {
            background-color: #fff3e0;
            color: #e65100;
        }

        .detail-value.status.failed {
            background-color: #ffebee;
            color: #c62828;
        }

/* Info Box */
.info-box {
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 15px 20px;
    margin: 25px auto;
    max-width: 600px;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .info-box.success {
        background-color: #e8f5e9;
        border-color: #4caf50;
    }

    .info-box.warning {
        background-color: #fff3e0;
        border-color: #ff9800;
    }

.info-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.info-text {
    color: #333;
    font-size: 14px;
    text-align: left;
    margin: 0;
    line-height: 1.5;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #368DB4;
    color: white;
}

    .btn-primary:hover {
        background-color: #2a6d8f;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

    .btn-secondary:hover {
        background-color: #e0e0e0;
    }

/* Debug Section */
.debug-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px dashed #ddd;
}

.debug-toggle {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

    .debug-toggle:hover {
        background-color: #e0e0e0;
    }

.debug-content {
    display: none;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 0 auto;
    max-width: 600px;
}

    .debug-content.show {
        display: block;
    }

    .debug-content h5 {
        color: #666;
        font-size: 13px;
        margin: 0 0 10px 0;
    }

    .debug-content textarea {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-family: 'Courier New', monospace;
        font-size: 12px;
        resize: vertical;
        background-color: white;
    }

/* ========================================
   SHARED COMPONENTS
   ======================================== */

/* Terms Section */
.terms-section {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

    .terms-section a {
        color: #368DB4;
        text-decoration: none;
        font-weight: 500;
    }

        .terms-section a:hover {
            text-decoration: underline;
        }

/* Proceed Button */
.proceed-button {
    width: 100%;
    padding: 15px;
    background-color: #368DB4;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 15px;
}

    .proceed-button:hover:not(:disabled) {
        background-color: #2a6d8f;
    }

    .proceed-button:disabled {
        background-color: #ccc;
        cursor: not-allowed;
        opacity: 0.6;
    }

/* Powered By */
.powered-by {
    text-align: right;
    padding: 10px 0;
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.powered-by-text {
    margin-right: 5px;
}


.powered-by-logo {
    /*height: 0.9em;*/ /* adjust: 0.9em – 1.2em depending on logo */
}

.fpx-powered-logo {
    height: 24px;
}

/* Important Notes */
.important-notes {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

    .important-notes h4 {
        margin: 0 0 10px 0;
        color: #856404;
        font-size: 14px;
    }

    .important-notes ul {
        margin: 0;
        padding-left: 20px;
        color: #856404;
    }

    .important-notes li {
        margin-bottom: 8px;
        font-size: 13px;
    }

.fpx-button-image {
    text-align: center;
    margin: 20px 0;
}

    .fpx-button-image img {
        max-width: 200px;
        height: auto;
    }

/* Footer */
.footer {
    text-align: center;
    padding: 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    color: #666;
    font-size: 12px;
}

/* Error Message */
.error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        margin: 0;
    }

    .content-section {
        padding: 15px;
    }

    .loading-container {
        padding: 40px 15px;
    }

    .result-container {
        padding: 30px 15px;
    }

    .transaction-card,
    .payment-info-card {
        padding: 20px 15px;
    }

    .detail-label,
    .detail-value {
        font-size: 13px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .progress-indicator {
        gap: 8px;
    }

    .step-label {
        display: none;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .info-value {
        text-align: left;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .detail-value {
        text-align: left;
    }
}
