/* General Body and Font Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #eef2f5; /* Light background from the image */
    color: #333; /* Dark grey text */
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Header */
header {
    width: 100%;
    background-color: #61b487; /* header background */
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #20303e;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: center;
    position: relative;
}

.header-title {
    color: #000000;
    font-size: 36px;
    font-weight: bold;
    margin: 0px 25px;

    text-align: left;
    flex: 1;
}

.logo {
    width: 80px;
    height: 80px;
}

.logo-placeholder {
    width: 60px;
    height: 60px;
    background-color: #4a6480; /* Placeholder color for logo */
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #eee;
    font-size: 10px;
    text-align: center;
    line-height: 1;
    box-sizing: border-box;
    padding: 5px;
    border: 1px solid #5a7490;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* Main Content Wrapper */
.main-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    box-sizing: border-box;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start; /* Align items to the top */
}

/* Left Column (Fee Details, Payment Details, Billing Details, Acknowledgment) */
.left-column {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Right Column (Payment Summary) */
.right-column {
    flex: 1;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    height: fit-content;
}

/* Card-like sections */
.card-section {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.card-section h3 {
    color: #2b3e50; /* Dark blue for headings */
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-section h3 .dropdown-arrow {
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

/* Form elements */
.form-group {
    margin-bottom: 15px;
}

.xplorpay-frame {
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-height: 140px;
    padding: 12px;
    box-sizing: border-box;
}

.form-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
}

.token-status {
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}

input.readonly {
  background-color: #e9ecef !important;  /* light gray */
  color: #6c757d !important;             /* darker gray text */
  cursor: not-allowed;                   /* visual indicator it's not editable */
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 13px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select {
    width: calc(100% - 22px);
    padding: 8px 10px;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    box-sizing: border-box;
}
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="number"]::placeholder {
    color: #999;
}

.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.input-row .form-group {
    flex: 1;
    margin-bottom: 0;
}
.input-row .form-group:last-child {
    margin-right: 0;
}

/* Buttons */
.btn {
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}
.btn:hover {
    background-color: #0056b3;
}

.btn-add {
    background-color: #28a745; /* Green add button */
}
.btn-add:hover {
    background-color: #218838;
}

.btn-submit {
    background-color: #007bff;
    width: 100%;
    padding: 10px;
    margin-top: 20px;
}
.btn-submit:hover {
    background-color: #0056b3;
}

.btn-cancel {
    background-color: #6c757d; /* Grey cancel button */
    width: 100%;
    padding: 10px;
    margin-top: 10px;
}
.btn-cancel:hover {
    background-color: #5a6268;
}

.btn-delete {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    padding: 5px 10px;
    color: #dc3545;
    transition: all 0.2s;
    line-height: 1;
}
.btn-delete:hover {
    transform: scale(1.2);
    color: #c82333;
}


/* Fee Details specific */
.fee-item-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 10px;
}
.fee-item-row .form-group {
    flex: 2;
    margin-bottom: 0;
}
.fee-item-row .form-group.amount {
    flex: 1;
}
.fee-item-row .btn {
    flex-shrink: 0;
    padding: 8px 12px;
    height: 38px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}
.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}
.checkbox-group input[type="checkbox"]:checked {
    background-color: #007bff;
    border-color: #007bff;
}
.checkbox-group input[type="checkbox"]:checked::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
}


/* Table styling */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}
.items-table th, .items-table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}
.items-table th {
    background-color: #f0f0f0;
    font-weight: normal;
}
.items-table td {
    background-color: #ffffff;
}
.items-table tbody tr:last-child td {
    border-bottom: none;
}
.items-table .empty-row {
    text-align: center;
    font-style: italic;
    color: #999;
    padding: 20px;
}

/* Payment Summary specific */
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.summary-row span:last-child {
    font-weight: bold;
}
.summary-total {
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
    margin-top: 15px;
    font-size: 16px;
}

.terms-checkbox {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}
.terms-checkbox input[type="checkbox"] {
    margin-right: 10px;
}
.terms-checkbox label {
    display: inline;
    font-size: 13px;
    color: #555;
}

/* Acknowledgment Section */
.acknowledgment-section {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    margin-top: 20px;
}
.acknowledgment-section h3 {
    color: #2b3e50;
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}
/* Left column acknowledgment section */
.left-column .acknowledgment-section .checkbox-group {
    margin-bottom: 10px;
}
.left-column .acknowledgment-section .checkbox-group label {
     color: #333;
}

/* Footer */
footer {
    width: 100%;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    color: #666;
    font-size: 12px;
    background-color: #f0f0f0;
    border-top: 1px solid #e0e0e0;
}

/* Receipt Page Styles */
#receiptPage {
    width: 100%;
    min-height: 100vh;
    background-color: #eef2f5;
    padding: 40px 20px;
    box-sizing: border-box;
}

.receipt-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.receipt-container {
    max-width: 800px;
    width: 100%;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px solid #2b3e50;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.receipt-header h1 {
    color: #2b3e50;
    margin: 0 0 10px 0;
    font-size: 32px;
}

.receipt-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0 0 20px 0;
}

.receipt-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.receipt-info p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}

.receipt-section {
    margin-bottom: 30px;
}

.receipt-section h3 {
    color: #2b3e50;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.receipt-table th,
.receipt-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.receipt-table th:nth-child(3),
.receipt-table td:nth-child(3) {
    text-align: right;
}

.receipt-table th {
    background-color: #f8f8f8;
    color: #2b3e50;
    font-weight: bold;
}

.receipt-table tfoot td {
    background-color: #f0f0f0;
    font-size: 16px;
    padding: 15px 12px;
}

.receipt-table tfoot td:last-child {
    text-align: right;
}

.receipt-details p {
    margin: 10px 0;
    color: #555;
    line-height: 1.6;
}

.receipt-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.receipt-actions .btn {
    min-width: 150px;
}

/* Print Styles */
@media print {
    body {
        background-color: white;
    }
    
    header, footer, .receipt-actions {
        display: none !important;
    }
    
    #receiptPage {
        padding: 0;
        background-color: white;
    }
    
    .receipt-container {
        box-shadow: none;
        border: none;
        max-width: 100%;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #2b3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-body h3 {
    color: #2b3e50;
    margin-top: 0;
}

.modal-body h4 {
    color: #2b3e50;
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-body p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal-body ul {
    margin-left: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

/* Link Styles */
a {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}

a:hover {
    color: #0056b3;
}

/* Acknowledgment Section in Payment Summary */
.right-column .acknowledgment-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.right-column .acknowledgment-section .checkbox-group {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.right-column .acknowledgment-section .checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

.right-column .acknowledgment-section .checkbox-group label {
    font-size: 12px;
    line-height: 1.5;
    color: #555;
    flex: 1;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    .input-row {
        flex-direction: column;
        gap: 0;
    }
    .input-row .form-group {
        width: 100%;
    }
    .fee-item-row {
        flex-direction: column;
        align-items: stretch;
    }
    .fee-item-row .btn {
        width: 100%;
        height: auto;
        margin-top: 10px;
    }
    
    .receipt-container {
        padding: 20px;
    }
    
    .receipt-header h1 {
        font-size: 24px;
    }
    
    .receipt-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .receipt-actions {
        flex-direction: column;
    }
    
    .receipt-actions .btn {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 15px;
    }
    
    .header-title {
        font-size: 24px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
}

