/* Brand Color Variables - Configurable via WordPress Admin */
:root {
    --poa-primary: #D5DFE7;
    --poa-secondary: #4A7C9E;
    --poa-accent: #dc2626;
    font-family: "Open Sans", sans-serif !important;
}

.wp-singular .container,
.page-template-default .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
}

button {
    font-family: "Open Sans", sans-serif !important;
}

/* Base Styles */
.poa-pay-container {
    position: relative;
    min-height: 100vh;
    font-family: "Open Sans", sans-serif !important;
    background: #f5f7fa;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Loader Overlay */
.poa-pay-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.poa-pay-loader-content {
    text-align: center;
}

.poa-pay-loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--poa-accent);
    border-radius: 50%;
    animation: poa-pay-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.poa-pay-loader-text {
    color: #4a5568;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* Override WordPress theme constraints */
body .poa-pay-container,
body.single .poa-pay-container,
body.page .poa-pay-container,
.entry-content .poa-pay-container,
.wp-block-group .poa-pay-container,
.site-content .poa-pay-container,
.content-area .poa-pay-container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Full screen layout - hide WordPress header/footer when on checkout page */
body.poa-pay-checkout-page .site-header,
body.poa-pay-checkout-page .site-footer,
body.poa-pay-checkout-page nav,
body.poa-pay-checkout-page .wp-block-template-part.site-header,
body.poa-pay-checkout-page .wp-block-template-part.site-footer {
    display: none !important;
}

body.poa-pay-checkout-page {
    margin: 0 !important;
    padding: 0 !important;
}

body.poa-pay-checkout-page .site {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

body.poa-pay-checkout-page .site-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

/* Top Left Logo */
.poa-pay-top-logo {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 10;
    max-width: 180px !important;
}

.poa-pay-top-logo-img {
    max-width: 180px;
    height: auto;
    display: block;
}

.poa-pay-top-logo-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--poa-secondary);
    letter-spacing: -0.5px;
}

.poa-pay-top-logo-pay {
    font-size: 24px;
    font-weight: 400;
    color: var(--poa-secondary);
    opacity: 0.8;
}

.poa-pay-tm {
    font-size: 14px;
    vertical-align: super;
    color: var(--poa-secondary);
}

/* Hide top-left POA logo when step-2 (logged in) is displayed */
.poa-pay-step-2-active #poa-pay-top-logo-id {
    display: none !important;
}

/* Background with split layout */
.poa-pay-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    display: flex;
    overflow: hidden;
}

.poa-pay-background-left {
    width: 50%;
    background: #ffffff;
    position: relative;
    z-index: 0;
}

.poa-pay-background-right {
    width: 50%;
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.poa-pay-background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

/* Step 1: Initial Form */
.poa-pay-form-wrapper {
    position: absolute;
    z-index: 1;
    background: white;
    border-radius: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 50px 40px;
    max-width: 470px;
    width: calc(100% - 80px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-height: auto;
    box-sizing: border-box;
}

.poa-pay-logo {
    text-align: center;
    margin-bottom: 32px;
    max-width: 120px !important;
    margin: auto !important;
}

.poa-pay-secondary-logo {
    max-width: 120px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.poa-pay-title {
    color: #385e71;
    font-size: 20px;
    font-weight: 500;
    text-align: left;
    margin: 60px 0 0px 0;
    padding: 13px 13px 10px 13px;
}

.title-lg {
    font-size: 20px !important;
    font-weight: 700;
    color: rgb(112 166 199) !important;
}

.poa-pay-subtitle {
    color: #385e71;
    font-size: 1.75rem !important;
    font-weight: 500;
    text-align: left;
    margin: 0 0 20px 0;
    padding: 0 13px 13px 13px;
}

.poa-pay-field {
    padding: 13px;
}

.poa-pay-field label {
    display: block;
    color: #6B7C8C;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.poa-pay-field input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #D5DFE7;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.poa-pay-field input:focus {
    outline: none;
    border-color: var(--poa-secondary);
    box-shadow: 0 0 0 3px rgba(74, 124, 158, 0.1);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 45px;
    background-color: #ffffff;
    /* border: 1px solid #4A5568; */
    color: #000;
}

.password-field input:focus {
    background-color: #ffffff;
    border-color: #4A5568;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 85, 104, 0.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #4A5568;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.toggle-password:hover {
    color: #2D3748;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* Validation Error States */
.poa-pay-field input.input-error {
    border-color: #dc2626;
    color: #dc2626;
}

.poa-pay-field input.input-error::placeholder {
    color: #dc2626;
}

.poa-pay-field input.input-error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.poa-pay-field label.label-error {
    color: #dc2626;
}

.toggle-password.icon-error {
    color: #dc2626;
}

.toggle-password.icon-error:hover {
    color: #b91c1c;
}

.poa-pay-field-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
    display: block;
    padding: 0 13px;
    font-weight: 500;
}

.poa-pay-submit {
    width: auto;
    padding: 7px 60px;
    background: var(--poa-accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    margin: 40px 13px 0 auto;
    display: block;
}

.poa-pay-submit:hover {
    background: #991d2099;
}

.poa-pay-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.poa-pay-message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.poa-pay-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Global Toaster System */
.poa-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    pointer-events: none;
}

.poa-toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    animation: slideInRight 0.3s ease-out;
    position: relative;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.poa-toast.toast-exit {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.poa-toast.toast-success {
    background-color: #10b981;
    color: #ffffff;
}

.poa-toast.toast-error {
    background-color: #dc2626;
    color: #ffffff;
}

.poa-toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.poa-toast-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.poa-toast-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.poa-toast-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Step 2: Full Page Layout */
.poa-pay-full-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    background: linear-gradient(166deg, #f2f2f2, #fff, #e6e6e6);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.poa-pay-header {
    padding: 0;
}

.poa-pay-header-content {
    width: 100%;
    margin: 0 auto;
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.poa-pay-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.poa-pay-logo-header {
    color: #D5DFE7;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    padding: 12px 0;
    width: 160px !important;
}

.poa-pay-logo-header img {
    width: 100%;
    display: block;
    object-fit: contain;
}

.poa-pay-logo-header .tm {
    font-size: 14px;
    vertical-align: super;
    color: #4A7C9E;
}

.poa-pay-tabs {
    display: flex;
    gap: 10px;
    background: #ffff;
    border-radius: 8px;
    padding: 15px;
}

.poa-pay-tab {
    padding: 10px 24px;
    background: #f7e5e5;
    border: none !important;
    color: #262b43e6;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.poa-pay-tab:hover {
    color: #262b43e6;
    background: #ebd0d0;
}

.poa-pay-tab.active {
    background: var(--poa-accent);
    color: #ffff;
}

.poa-pay-content {
    padding: 0 40px 40px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.poa-pay-tab-content {
    display: none;
}

.poa-pay-tab-content.active {
    display: block;
}

.poa-pay-two-column {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

/* Bill Details Card */
.bill-details-card {
    background: var(--poa-primary);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px #0003;
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 30px !important;
}

.bill-details-card .card-title {
    color: var(--poa-accent);
    font-weight: 700;
    margin: 0 0 24px 0;
    letter-spacing: 2px;
    text-align: center;
}

.bill-info {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
}

.property-address {
    color: #000;
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 8px 0;
    line-height: 1.5;
    letter-spacing: 2px;
}

.matter-title {
    color: #000;
    font-size: 16px;
    margin: 0;
    font-weight: 600;
    padding: 15px 0px;
}

.charges-list-wrapper {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.divider {
    border-bottom: 1px solid #e5e5e8;
    width: 100%;
    height: 0px;
    border-top: none;
    border-left: none;
    border-right: none;
}

.charges-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.charges-list-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.charges-list-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.charges-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.charges-list {
    padding-right: 10px;
}

.charge-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    letter-spacing: 2px !important;
}

.charge-item:last-child {
    border-bottom: none;
}

.charge-name {
    color: #000;
    font-size: 16px;
    flex: 1;
    line-height: 1.375rem;
    padding-right: 15px;
    font-weight: 400;
}

.charge-amount {
    color: #000;
    font-size: 16px;
    font-weight: 400 !important;
    white-space: nowrap;
}

.matter-id {
    font-weight: 700 !important;
    font-size: 20px;
    color: black;
}

.error-message {
    color: #f04040 !important;
    margin-top: 10px;
    font-size: 20px;
    font-weight: 400;
    background-color: #ffe5e5 !important;
    padding: 20px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 15px;
    margin-top: 30px;
    border: 1px solid #ee9999 !important;
}

.bill-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 0px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.poa-pay-background::before {
    position: absolute;
    content: '';
    background-image: url(../images/video-mask.svg);
    height: 600px;
    width: 100%;
    left: 0;
    top: 0;
    background-size: cover;
    background-position: left bottom;
    background-repeat: no-repeat;
    z-index: 1;
}

.poa-pay-background::after {
    position: absolute;
    content: '';
    background: linear-gradient(180deg, #0000, #517a908c);
    height: 300px;
    width: 100%;
    left: 0;
    bottom: 0;
}




.total-label {
    color: var(--poa-accent);
    font-size: 1.125rem !important;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    color: #000;
}

.total-amount {
    color: var(--poa-accent);
    font-size: 1.125rem !important;
    font-weight: 900;
    margin: 0;
    letter-spacing: 2px;
    color: #000;
}

.bill-details-card h1.total-label,
.bill-details-card h1.total-amount {
    font-weight: 700;
    letter-spacing: 2px;
}

/* Payment Form Card */
.payment-form-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px #0003;
    color: #000;
}

.payment-form-card .card-title {
    color: var(--poa-accent);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 15px 0;
    letter-spacing: 2px;
}

.form-section {
    margin-bottom: 30px;
}

.section-title {
    color: var(--poa-accent);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 18px 0;
}

.section-title-bold {
    color: var(--poa-accent);
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 30px 0;
}

.section-title-2 {
    color: var(--poa-accent);
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    margin: 0 0 18px 0;
}

.payment-method-options {
    display: flex;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-label input[type="radio"] {
    margin: 0 12px 0 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--poa-accent);
}

.radio-label input[type="radio"]:checked+span {
    /* color: #000;
    font-weight: 600; */
    outline: none;
}

.radio-label span {
    color: #262b43e6;
    font-size: 16px;
    font-weight: 400;

}

.saved-bank-label {
    color: #000;
}

#saved-bank-info {
    background: #ffff;
    padding: 15px 0px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#saved-bank-info .bank-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

#saved-bank-info .bank-details {
    flex: 1;
}

#saved-bank-info .bank-account-type {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0;
}

#saved-bank-info .bank-account-number {
    font-size: 12px;
    font-weight: 300;
    margin: 0;
}

#saved-bank-info p {
    margin: 0;
    color: #262b43e6;
    font-size: 14px;
}

#saved-bank-info strong {
    color: #000;
    font-weight: 600;
}

#saved-bank-masked {
    color: #000;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-field {
    flex: 1;
    position: relative;
}

.form-field.half {
    flex: 1;
}

.form-field.full {
    width: 100%;
}

/* Floating label - hidden by default */
.form-field label {
    position: absolute;
    left: 12px;
    top: 0;
    transform: translateY(-50%);
    color: var(--poa-accent);
    font-size: 12px;
    font-style: italic;
    font-weight: 400;
    pointer-events: none;
    background: #ffffff;
    padding: 0 4px;
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Show label only when focused or has value */
.form-field.focused label,
.form-field.has-value label {
    opacity: 1;
    visibility: visible;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #D5DFE7;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background: #ffffff;
    color: #333;
    transition: border-color 0.2s ease;
}

/* Placeholder styling - italic, gray */
.form-field input::placeholder {
    color: #9ca3af;
    font-style: italic;
    transition: opacity 0.2s ease;
}

.form-field select::options {
    color: #9ca3af;
    font-style: italic;
    transition: opacity 0.2s ease;
}

/* Hide placeholder when focused or has value */
.form-field.focused input::placeholder,
.form-field.has-value input::placeholder {
    opacity: 0;
}

/* Accent border only on focused or has-value */
.form-field.focused input,
.form-field.focused select,
.form-field.has-value input,
.form-field.has-value select {
    outline: none;
    border-color: var(--poa-accent);
}

/* Remove default focus outline */
.form-field input:focus,
.form-field select:focus {
    outline: none;
}

.field-error {
    margin-bottom: 6px;
    font-size: 13px;
    color: #dc2626;
    font-style: italic;
    display: block;
    font-weight: 400;
}

/* Payment form error states */
.form-field input.input-error,
.form-field select.input-error {
    border-color: #dc2626;
    color: #dc2626;
}

.form-field input.input-error::placeholder,
.form-field select.input-error::placeholder {
    color: #dc2626;
}

.form-field label.label-error {
    color: #dc2626;
}

.form-field.input-error label {
    color: #dc2626;
}

.amount-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.amount-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    padding-top: 0px !important;
    color: #262b43b3;
    font-size: 14px;
    font-weight: 500;
}

.amount-row.editable {
    font-weight: 400;
    font-size: 14px;
    color: #262b43b3;
}

.amount-row.total {
    padding-top: 0px;
    font-weight: 400;
    font-size: 18px;
    color: #262b43b3;
}

.amount-row span:last-child {
    color: #262b43b3;
    font-weight: 400;
}

.amount-row.total span:last-child {
    color: #000;
    font-size: 18px;
    font-weight: 400;
}

.form-footer-parent {
    width: 100%;
    display: flex;
    justify-content: end;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #000;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--poa-accent);
}

.checkbox-label a,
.checkbox-label span a {
    color: var(--poa-accent);
    text-decoration: none;
}

.checkbox-label a:hover,
.checkbox-label span a:hover {
    text-decoration: underline;
}

.poa-pay-submit-final {
    /* width: 50%; */
    float: right;
    padding: 10px;
    letter-spacing: 0.9px !important;
    background: var(--poa-accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    margin-left: 85px;
    margin-top: 3px;
}

.poa-pay-submit-final:hover:not(:disabled) {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    transform: translateY(-1px);
}

.poa-pay-submit-final:disabled {
    background: #95a5a6;
    color: #ffffff;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.6;
}

/* Payment History */
.payment-history-card {
    background: var(--poa-primary);
    border-radius: 12px;
    padding: 0 0 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#payment-history-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.payment-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.payment-history-table thead {
    background: var(--poa-accent);
}

.payment-history-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--poa-primary);
    font-size: 13px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.payment-history-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #262b43e6;
    font-weight: 500;
    font-size: 15px;
    background: var(--poa-primary);
}

.payment-history-table tbody tr {
    background: var(--poa-primary);
}

.payment-history-table tbody tr:nth-child(even) {
    background: rgba(26, 54, 93, 0.8);
}

.payment-history-table tbody tr:hover {
    background: rgba(26, 54, 93, 0.9);
}

.payment-history-table .loading-message {
    text-align: center;
    color: #6B7C8C;
    padding: 40px;
}

.payment-history-pagination {
    margin-top: 30px;
    width: 100%;
}

.pagination-container {
    display: flex;
    justify-content: end;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.pagination-items-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-label {
    color: #000;
    font-size: 14px;
    white-space: nowrap;
}

.pagination-items-select {
    padding: 8px 12px;
    border: 1px solid #cdcdcd;
    background: #ffff;
    color: #000;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    min-width: 70px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
    transition: all 0.2s ease;
}

.poa-terms-modal-content-body strong {
    font-size: 18px;
    color: #000;
}

.pagination-items-select:hover {
    border-color: #000;
}

.pagination-items-select:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.pagination-range {
    color: #000;
    font-size: 14px;
    white-space: nowrap;
}

.pagination-nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-nav {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7a7c7e;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    border: none !important;
    background: transparent;
}

.pagination-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-nav svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-items-per-page,
    .pagination-range,
    .pagination-nav-buttons {
        justify-content: center;
    }
}

.history-placeholder {
    color: #6B7C8C;
    font-size: 14px;
    margin-top: 20px;
    text-align: center;
}

/* Success Modal */
.poa-pay-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.success-modal-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: bold;
}

.success-modal-content h3 {
    color: #D5DFE7;
    font-size: 24px;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.success-modal-content p {
    color: #6B7C8C;
    font-size: 14px;
    margin: 0 0 25px 0;
    line-height: 1.6;
}

.success-close-btn {
    padding: 12px 32px;
    background: #D5DFE7;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.success-close-btn:hover {
    background: #2E5570;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .poa-pay-two-column {
        grid-template-columns: 1fr;
    }

    .bill-details-card {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .poa-pay-content {
        padding: 20px;
    }

    .poa-pay-header-content {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .poa-pay-tabs {
        width: 100%;
    }

    .poa-pay-tab {
        flex: 1;
        text-align: center;
    }

    .payment-form-card {
        padding: 25px;
    }

    .bill-details-card {
        padding: 25px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-field {
        margin-bottom: 15px;
    }
}

@media (max-width: 600px) {
    .poa-pay-form-wrapper {
        margin: 40px 20px;
        padding: 30px 20px;
    }

    .poa-pay-content {
        padding: 15px;
    }

    .payment-form-card,
    .bill-details-card {
        padding: 20px;
    }
}


.edit-amount-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 6px;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 20H21' stroke='%23991D21' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M16.5 3.5L20.5 7.5L7 21H3V17L16.5 3.5Z' stroke='%23991D21' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
}

#edit-amount-input {
    width: 110px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

#edit-amount-save,
#edit-amount-cancel {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-left: 6px;
}

#edit-amount-save {
    color: #16a34a !important;
}

/* green */
#edit-amount-cancel {
    color: #dc2626 !important;
}

/* red */

/* ==================== THANK YOU PAGE STYLES ==================== */
/* Inline Thank You page - replaces checkout content after successful payment */


.breadcrumbs {
    margin: 0 0 0px !important;
}

.boxstyle {
    padding: 15px !important;
    margin: 0 15px 35px !important;
}

.boxstyle h2,
.boxstyle p {
    margin: 0 !important;
    padding: 0 !important;
}

.page_title h1 {
    margin: 0 !important;
    padding: 0 !important;
}

.page_title {
    margin: 0 0 0px !important;
    padding: 15px 30px !important;
}

.poa-pay-thank-you-page {
    position: relative;
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.thank-you-header {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 10;
    padding: 0;
    max-width: 180px !important;
}

.thank-you-tenant-logo {
    max-width: 180px;
    height: auto;
    display: block;
}

.thank-you-logo-poa {
    color: #4A7C9E;
    font-weight: 700;
    letter-spacing: 2px;
}

.thank-you-logo-pay {
    color: #6B7C8C;
    font-weight: 400;
    margin-left: 4px;
}

.thank-you-content-wrapper {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.thank-you-icon {
    margin-bottom: 20px;
}

.thank-you-icon svg {
    width: 80px;
    height: 80px;
}

.thank-you-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    margin: 0 0 15px 0;
}

.thank-you-message {
    font-size: 1.15rem;
    line-height: 1.7;
    margin: 0 0 15px 0;
    font-weight: 500;
}

.thank-you-message strong {
    color: #2c5282;
    font-weight: 700;
}

.thank-you-redirect {
    margin-top: 30px;
    font-size: 0.95rem;
    color: #718096;
}

#thank-you-countdown {
    font-weight: 700;
    color: #2c5282;
}

@media (max-width: 768px) {
    .thank-you-header {
        top: 20px;
        left: 20px;
    }

    .thank-you-tenant-logo {
        max-width: 140px;
    }

    .thank-you-content-wrapper {
        padding: 20px 15px;
    }

    .thank-you-title {
        font-size: 2rem;
    }

    .thank-you-message {
        font-size: 0.9rem;
    }
}

/* ==================== PAYMENT CONFIRMATION MODAL ==================== */
.poa-payment-confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.poa-payment-confirm-modal-overlay.active {
    display: flex;
}

.poa-payment-confirm-modal {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.poa-payment-confirm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.poa-payment-confirm-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #262b43;
    margin: 0;
}

.poa-payment-confirm-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
}

.poa-payment-confirm-modal-close:hover {
    background: #f3f4f6;
    color: #000;
}

.poa-payment-confirm-modal-body {
    padding: 24px 30px;
    color: #262b43;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    letter-spacing: 0.9;
}

.poa-payment-confirm-modal-body p {
    margin: 0;
}

.poa-payment-confirm-modal-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 18px 24px;
}

.poa-payment-confirm-modal-close-btn {
    padding: 10px 24px;
    background: #ffffff;
    color: var(--poa-accent);
    border: 1px solid var(--poa-accent);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.poa-payment-confirm-modal-close-btn:hover {
    background: #f9fafb;
}

.poa-payment-confirm-modal-agree-btn {
    padding: 10px 24px;
    background: var(--poa-accent);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.poa-payment-confirm-modal-agree-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

@media (max-width: 768px) {
    .poa-payment-confirm-modal {
        max-width: 90%;
    }

    .poa-payment-confirm-modal-header,
    .poa-payment-confirm-modal-body,
    .poa-payment-confirm-modal-footer {
        padding: 15px 20px;
    }
}

/* ==================== TERMS & CONDITIONS MODAL ==================== */
.poa-terms-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.poa-terms-modal-overlay.active {
    display: flex;
}

.poa-terms-modal {
    background: #ffffff;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.poa-terms-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.poa-terms-modal-title {
    font-size: 14px;
    font-weight: 800;
    color: #000;
    margin: 0;
}

.poa-terms-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.poa-terms-modal-close:hover {
    background: #f3f4f6;
    color: #000;
}

.poa-terms-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 30px;
}

/* Custom scrollbar styling */
.poa-terms-modal-body::-webkit-scrollbar {
    width: 8px;
}

.poa-terms-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.poa-terms-modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.poa-terms-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.poa-terms-modal-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.poa-terms-modal-logo-icon {
    width: 36px;
    height: 36px;
    background: #20b2aa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.poa-terms-modal-logo-text {
    font-size: 18px;
    font-weight: 500;
    color: #000;
    letter-spacing: 2px;
}

.poa-terms-modal-logo-tm {
    font-size: 9px;
    vertical-align: super;
    color: #20b2aa;
    margin-left: 1px;
    font-weight: 400;
}

.poa-terms-modal-content-title {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1.4;
}

.poa-terms-modal-last-modified {
    font-size: 13px;
    color: #4a5568;
    margin: 0 0 20px 0;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.poa-terms-modal-content-body {
    font-size: 13px;
    line-height: 1.6;
    color: #000;
    font-weight: 400;
    letter-spacing: 0.1px;
}

.poa-terms-modal-content-body h1,
.poa-terms-modal-content-body h2,
.poa-terms-modal-content-body h3 {
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #000;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.poa-terms-modal-content-body h1:first-child,
.poa-terms-modal-content-body h2:first-child,
.poa-terms-modal-content-body h3:first-child {
    margin-top: 0;
}

.poa-terms-modal-content-body p,
.poa-terms-modal-content-body sup {
    margin: 0 0 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #262b43b3;
}

.poa-terms-modal-content-body ul,
.poa-terms-modal-content-body ol {
    margin: 10px 0;
    padding-left: 20px;
}

.poa-terms-modal-content-body li {
    margin: 6px 0;
    font-size: 13px;
    line-height: 1.6;
}

/* Style numbered sections (1., 2., etc.) and subsections */
.poa-terms-modal-content-body p strong {
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* Ensure bold text in paragraphs maintains proper spacing */
.poa-terms-modal-content-body p strong:first-child {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.poa-terms-modal-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 14px;
}

.poa-terms-modal-error {
    text-align: center;
    padding: 60px 20px;
    color: #dc2626;
    font-size: 14px;
}

.poa-terms-modal-footer {
    padding: 18px 30px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

.poa-terms-modal-accept-btn {
    padding: 10px 28px;
    background: var(--poa-accent);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.poa-terms-modal-accept-btn:hover:not(:disabled) {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    transform: translateY(-1px);
}

.poa-terms-modal-accept-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .poa-terms-modal {
        max-height: 95vh;
    }

    .poa-terms-modal-header,
    .poa-terms-modal-body,
    .poa-terms-modal-footer {
        padding: 20px;
    }
}

/* ==================== UPDATE BILL PAGE ==================== */
.poa-pay-update-bill-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

}

.update-bill-header {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 10;
    padding: 0;
    max-width: 180px;
}

.update-bill-tenant-logo {
    max-width: 180px;
    height: auto;
    display: block;
}

.update-bill-content-wrapper {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.update-bill-content-card {
    background: #ffffff;
    border-radius: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 50px 40px;
    max-width: 470px;
    width: calc(100% - 80px);
    text-align: center;
    box-sizing: border-box;
}

.update-bill-icon {
    margin-bottom: 30px;
}

.update-bill-icon svg {
    width: 80px;
    height: 80px;
}

.update-bill-message {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0 0 40px 0;
    font-weight: 500
}

.update-bill-button {
    padding: 8px 130px;
    background: var(--poa-accent);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.update-bill-button:hover:not(:disabled) {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}

.update-bill-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .update-bill-header {
        top: 20px;
        left: 20px;
    }

    .update-bill-tenant-logo {
        max-width: 140px;
    }

    .update-bill-content-card {
        padding: 40px 30px;
        border-radius: 30px;
    }

    .update-bill-message {
        font-size: 1rem;
    }

    .update-bill-button {
        padding: 12px 32px;
        font-size: 14px;
    }
}