﻿:root{
    /* Rifleman Pay Color Scheme - aligned with Vue app */
    
    /* Marble Whites */
    --color-marble-white: #fffdf3;
    --color-marble-white-darken1: #f2edd7;
    --color-marble-grey: #eae7dd;

    /* Slate Blacks */
    --color-slate-black: #191919;
    --color-slate-grey: #4c4c4c;

    /* Greys */
    --color-grey-lighten4: #f4f3f1;
    --color-grey-lighten3: #e0dfdc;
    --color-grey-lighten2: #c7c5c1;
    --color-grey-lighten1: #9e9c94;
    --color-grey: #77756e;
    --color-grey-darken1: #504e49;
    --color-grey-darken2: #353431;

    /* Steel Blues */
    --color-steel-blue-lighten2: #c4d3dd;
    --color-steel-blue-lighten1: #89a8ba;
    --color-steel-blue: #57788d;
    --color-steel-blue-darken1: #2d4a5d;
    --color-steel-blue-darken2: #1c3242;

    /* Copper Greens */
    --color-copper-green-lighten2: #a4ddc7;
    --color-copper-green-lighten1: #7dccaa;
    --color-copper-green: #5daa87;
    --color-copper-green-darken1: #3d725a;
    --color-copper-green-darken2: #1e382d;

    /* Rust Reds */
    --color-rust-red-lighten2: #f1c19f;
    --color-rust-red-lighten1: #e58443;
    --color-rust-red: #cb5819;
    --color-rust-red-darken1: #8e340e;
    --color-rust-red-darken2: #5d2206;

    /* State Colors */
    --color-success: #529952;
    --color-success-lighten4: #e1f3e1;
    --color-info: #406fbf;
    --color-info-lighten4: #d9e2f2;
    --color-warning: #ffc551;
    --color-warning-lighten4: #fff2cb;
    --color-danger: #c84c3c;
    --color-danger-lighten4: #fbdcd0;

    /* Semantic mappings */
    --primary-color: var(--color-slate-black);
    --primary-color-hover: var(--color-slate-grey);
    --primary-color-text: var(--color-marble-white);
    --light-blue: #F1F7FE;
    --grey: #1B1B1B;
    --light-grey: #F9F9F9;
    --semantic-green: #296027;
    --semantic-green-lighten2: #C9E7CC;
    --semantic-orange: #D56228;
    --semantic-orange-lighten3: #FCF4E3;
}

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

/* Provide sufficient contrast against white background */
a {
    color: #0366d6;
}

/* =========== Bootstrap colour overrides =========== */

.alert-success {
    color: var(--semantic-green);
    background-color: var(--semantic-green-lighten2);
    border-color: var(--semantic-green-lighten2);
}

.alert-secondary {
    color: var(--grey);
    background-color: var(--light-grey);
    border-color: var(--light-grey);
}

.alert-warning {
    color: var(--semantic-orange);
    background-color: var(--semantic-orange-lighten3);
    border-color: var(--semantic-orange-lighten3);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.table-dark {
    background-color: var(--primary-color) !important;
}

/* Back navigation with logo fade effect */
.back-nav-container {
    position: relative;
    margin-top: 0.5rem;
}

.back-nav-link {
    display: block;
    text-decoration: none;
    position: relative;
}

.back-nav-arrow {
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    fill: rgba(255, 255, 255, 0.5);
    transition: fill 0.4s ease, transform 0.4s ease;
}

.back-nav-content {
    position: relative;
    width: 140px;
    height: 34px;
    display: flex;
    align-items: center;
}

.back-nav-logo {
    height: auto;
    width: 140px;
    display: block;
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
    position: absolute;
    top: 50%;
    left: -12px;
    transform: translateY(-50%) translateX(0);
}

.back-nav-text {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%) translateX(4px);
    opacity: 0 !important;
    transition: opacity 0.4s ease, transform 0.4s ease;
    white-space: nowrap;
    visibility: hidden;
    color: var(--color-marble-white);
    font-weight: 500;
}

.back-nav-link:hover .back-nav-logo {
    opacity: 0;
    transform: translateY(-50%) translateX(-2.5px);
}

.back-nav-link:hover .back-nav-text {
    opacity: 1 !important;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.back-nav-link:hover .back-nav-arrow {
    fill: var(--color-marble-white);
    transform: translateY(-50%) translateX(-3px);
}

.back-nav-link:hover .christmas-hat {
    opacity: 0;
    transform: translateX(-2.5px);
}

.btn-primary {
    color: var(--primary-color-text);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    color: var(--primary-color-text);
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: var(--primary-color-text);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Ensure anchor tags with button classes get proper styling */
a.btn-primary {
    color: var(--primary-color-text);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    text-decoration: none;
}

a.btn-primary:hover {
    color: var(--primary-color-text);
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
    text-decoration: none;
}

a.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
    text-decoration: none;
}

a.btn-outline-primary:hover {
    color: var(--primary-color-text);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    text-decoration: none;
}

/* Disabled button states to match theme */
.btn-primary.disabled,
.btn-primary:disabled {
    color: var(--primary-color-text);
    background-color: var(--color-grey-lighten1);
    border-color: var(--color-grey-lighten1);
    opacity: 0.65;
}

.btn-outline-primary.disabled,
.btn-outline-primary:disabled {
    color: var(--color-grey-lighten1);
    background-color: transparent;
    border-color: var(--color-grey-lighten1);
    opacity: 0.65;
}

a.btn-primary.disabled,
a.btn-primary:disabled {
    color: var(--primary-color-text);
    background-color: var(--color-grey-lighten1);
    border-color: var(--color-grey-lighten1);
    opacity: 0.65;
    pointer-events: none;
}

a.btn-outline-primary.disabled,
a.btn-outline-primary:disabled {
    color: var(--color-grey-lighten1);
    background-color: transparent;
    border-color: var(--color-grey-lighten1);
    opacity: 0.65;
    pointer-events: none;
}

/* Active and focus states to match theme - with higher specificity to override Bootstrap */
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
    color: var(--primary-color-text) !important;
    background-color: var(--color-slate-grey) !important;
    border-color: var(--color-slate-grey) !important;
}

.btn-primary:active,
.btn-primary.active {
    color: var(--primary-color-text);
    background-color: var(--color-slate-grey);
    border-color: var(--color-slate-grey);
}

.btn-primary:not(:disabled):not(.disabled):focus,
.btn-primary:not(:disabled):not(.disabled).focus {
    color: var(--primary-color-text) !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 25, 25, 0.25) !important;
}

.btn-primary:focus,
.btn-primary.focus {
    color: var(--primary-color-text);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(25, 25, 25, 0.25);
}

.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-primary:not(:disabled):not(.disabled).active,
.show > .btn-outline-primary.dropdown-toggle {
    color: var(--primary-color-text) !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-primary:active,
.btn-outline-primary.active {
    color: var(--primary-color-text);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:not(:disabled):not(.disabled):focus,
.btn-outline-primary:not(:disabled):not(.disabled).focus {
    color: var(--primary-color) !important;
    background-color: transparent !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 25, 25, 0.25) !important;
}

.btn-outline-primary:focus,
.btn-outline-primary.focus {
    color: var(--primary-color);
    background-color: transparent;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(25, 25, 25, 0.25);
}

/* Active and focus states for anchor buttons - with higher specificity */
a.btn-primary:not(:disabled):not(.disabled):active,
a.btn-primary:not(:disabled):not(.disabled).active,
.show > a.btn-primary.dropdown-toggle {
    color: var(--primary-color-text) !important;
    background-color: var(--color-slate-grey) !important;
    border-color: var(--color-slate-grey) !important;
    text-decoration: none !important;
}

a.btn-primary:active,
a.btn-primary.active {
    color: var(--primary-color-text);
    background-color: var(--color-slate-grey);
    border-color: var(--color-slate-grey);
    text-decoration: none;
}

a.btn-primary:not(:disabled):not(.disabled):focus,
a.btn-primary:not(:disabled):not(.disabled).focus {
    color: var(--primary-color-text) !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 25, 25, 0.25) !important;
    text-decoration: none !important;
}

a.btn-primary:focus,
a.btn-primary.focus {
    color: var(--primary-color-text);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(25, 25, 25, 0.25);
    text-decoration: none;
}

a.btn-outline-primary:not(:disabled):not(.disabled):active,
a.btn-outline-primary:not(:disabled):not(.disabled).active,
.show > a.btn-outline-primary.dropdown-toggle {
    color: var(--primary-color-text) !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    text-decoration: none !important;
}

a.btn-outline-primary:active,
a.btn-outline-primary.active {
    color: var(--primary-color-text);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    text-decoration: none;
}

a.btn-outline-primary:not(:disabled):not(.disabled):focus,
a.btn-outline-primary:not(:disabled):not(.disabled).focus {
    color: var(--primary-color) !important;
    background-color: transparent !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 25, 25, 0.25) !important;
    text-decoration: none !important;
}

a.btn-outline-primary:focus,
a.btn-outline-primary.focus {
    color: var(--primary-color);
    background-color: transparent;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(25, 25, 25, 0.25);
    text-decoration: none;
}

.btn-link:focus,
.btn-link.focus {
    color: var(--primary-color);
    text-decoration: underline;
    box-shadow: none;
}

.btn-link:active,
.btn-link.active {
    color: var(--primary-color-hover);
    text-decoration: underline;
}

/* Style the cancel link to match primary theme */
.btn-link {
    color: var(--primary-color);
    border-color: transparent;
    background-color: transparent;
    text-decoration: none;
}

.btn-link:hover {
    color: var(--primary-color-hover);
    text-decoration: underline;
}

.btn-link.disabled,
.btn-link:disabled {
    color: var(--color-grey-lighten1);
    opacity: 0.65;
    pointer-events: none;
    text-decoration: none;
}

.badge-danger {
    background-color: var(--color-danger);
    color: var(--color-marble-white);
}

.badge-light {
    background-color: var(--color-grey-lighten3);
    color: var(--color-grey-darken1);
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    position: relative;
    min-height: 100%;
}

body {
    /* Margin bottom by footer height */
    margin-bottom: 60px;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px; /* Vertically center the text there */
}

/* Payment method selection screen */
#payment-methods-page-container {
    max-width: 64rem;
}

#payment-methods-page-container .pay-btn {
    min-width: 5rem;
}

/* Recurring screen */
.recurring-container {
    max-width: 56rem;
    margin-top: 24px;
}

.recurring-container .th-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.recurring-container .padding-0 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.tooltip {
    pointer-events: none;
}

#text-agree {
    cursor: pointer;
}

/* Select invoice screen */
#lock:hover {
    cursor: default;
}

#no-due-invoices-section,
#no-future-invoices-section,
#no-recurring-payments-section {
    display: none;
    font-style: italic;
    color: #a0a0a0;
    text-align: center;
}

/* Loading overlay - Housebeat */

.loadingoverlay {
    background: rgba(0, 0, 0, 0.7);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 9000;
    opacity: 0;
    overflow: hidden;
    transition: opacity ease-in 200ms;
}

.loadingoverlay.show {
    opacity: 1;
}

.loadingoverlay .strip {
    position: absolute;
    height: 180px;
    background: #fff;
    width: 100%;
    top: 50%;
    margin: -90px 0 0;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.5);
    font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
}

.loadingoverlay .icon {
    width: 160px;
    height: 67px;
    margin: 60px auto 28px auto;
    display: block;
}

.loadingoverlay .icon.anim {
    background-image: url('../images/loadingoverlay-sprite-50.png');
    background-repeat: no-repeat;
    background-color: none;
}

.loadingoverlay .title {
    text-align: center;
    line-height: 32px;
    height: 32px;
    font-size: 23px;
    text-transform: uppercase;
    color: #1f2327;
}

.loadingoverlay .text {
    text-align: center;
    height: 0;
    font-size: 16px;
    line-height: 32px;
    opacity: 0;
}

.loadingoverlay .title.show,
.loadingoverlay .text.show {
    opacity: 1;
}

.loadingoverlay .progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.loadingoverlay .progress .description {
    text-align: center;
    font-size: 11px;
    line-height: 21px;
    color: #aaa;
    text-transform: uppercase;
}

.loadingoverlay .progress .bar {
    height: 6px;
    width: 100%;
    background: #ccc;
}

.loadingoverlay .progress .indicator {
    height: 6px;
    background: #439732;
}

/*--- Payment Method Styles ---*/
#payment-methods-container .card {
    max-width: 100%;
}

#payment-methods-container .disabled {
    cursor: default;
    opacity: .5;
    pointer-events: none;
}

#payment-methods-container .card-deck {
    justify-content: center;
}

#payment-methods-container .disabled:focus {
    box-shadow: none;
}

#payment-methods-container .card.text-center.disabled img {
    filter: grayscale(100%)
}

#payment-methods-container .card.text-center.disabled .card-body {
    color: #A0A0A0;
}

#payment-methods-container .card.text-center.disabled .btn {
    background-color: #5E5E5E;
    border-color: #5E5E5E;
}

#back-to-invoices-button {
    max-width: 250px;
    color: #333;
    border-color: #333;
}

#back-to-invoices-button:hover {
    max-width: 250px;
    color: #fff;
    border-color: #333;
    background-color: #333;
}

#cancel-link {
    float: none !important;
}

.recurring-tag:before, .due-string:before {
    content: " ";
    white-space: pre;
}

.amount-due-amount {
    padding-right: 0;
}

.payment-card {
    height: 20px;
    border-radius: 4px;
}

@media only screen and (min-width: 600px) {

    .section-header {
        padding-left: 12px;
    }
    
    .invoice-list-description-column {
        width: 40% !important;
    }

    #recurring-payments-table .recurring-configurations-description-column {
        width: 42.5% !important;
    }

    .invoice-list-invoice-date-column {
        width: 10% !important;
    }

    .invoice-list-invoice-number-column {
        width: 5% !important;
    }

    .invoice-list-due-date-column {
        width: 30% !important;
    }

    .invoice-list-amount-due-column {
        width: 5% !important;
        text-align: right !important;
    }

    .invoice-list-button-column {
        width: 10% !important;
    }

    .invoice-list-payment-method-column {
        width: 28% !important;
    }

    .invoice-list-cancel-button-column {
        width: 28% !important;
    }

    #overview-cancel-link {
        float: right !important;
    }

    #setup-recurring-link {
        float: right !important;
    }

    .recurring-tag {
        padding-right: 18px;
        font-size: 13px;
    }

    .recurring-tag:before, .due-string:before {
        content: "\a";
        white-space: pre;
    }

    .amount-due-amount {
        padding-right: 18px;
    }

    .pm-image, .pm-radio {
        display: flex !important;
        align-items: center;
    }
}


@media only screen and (max-width: 600px) {
    #pm-text-container {
        margin-top: 0.1em;
    }

    #due-date-container {
        display: flex;
        flex-direction: column-reverse;
    }

    #arrears-warning {
        padding: 0;
    }

    #arrears-warning .alert {
        align-items: start !important;
        border-radius: 0;
    }

    .recurring-checkout-container #button-container, 
    .recurring-container #button-container,
    #payment-methods-page-container #button-container {
        display: flex;
        flex-direction: column-reverse;
        text-align: center;
    }
}
/* =========== Modals =========== */
.pay-modal .modal-header, .pay-modal .modal-footer {
    border: none;
}

.pay-modal .modal-content {
    padding: 12px;
}

.pay-modal .close-icon-container {
    height: 24px;
    width: 24px;
    position: absolute;
    right: 12px;
    top: 12px;
    cursor: pointer;
}

.pay-modal .close-icon {
    height: 100%;
    width: 100%;
    color: #DFDFDF;
}

.pay-modal .close-icon:hover {
    color: #B6B6B6;
}

/* =========== Tables =========== */
.pay-table thead th {
    border-style: none;
}

#recurring-table th {
    border-top: none;
}

#recurring-table .material-icons-outlined {
    font-size: 18px;
    vertical-align: sub;
}

/* =========== Recurring checkout screen =========== */
#recurring-checkout{
    max-width: 64rem;
}

#recurring-checkout .radio-input {
    cursor: pointer;
}

#recurring-checkout .payment-methods .card,
#payment-methods-page-container .payment-methods .card {
    background-color: var(--light-grey);
    border: none;
}

#recurring-checkout .payment-methods .card.selected,
#payment-methods-page-container .payment-methods .card.selected {
    background-color: var(--light-blue);
    border: none;
}

#recurring-checkout .card img,
#payment-methods-page-container .card img {
    margin-top: -5px;
	max-height: 20px;
}

.recurring-checkout-container {
    max-width: 64rem;
}

/* =========== Success, Complete & Void payment screens =========== */
.payment-flow-complete {
    max-width: 54rem;
}

.payment-flow-complete .alert-success .material-symbols-outlined,
.payment-flow-complete .alert-warning .material-symbols-outlined{
    font-size: 2rem;
}

/* =========== Recurring success payment screen =========== */
#recurring-success-payment {
    max-width: 64rem;
}

#recurring-success-payment .alert-success .material-symbols-outlined {
    font-size: 2rem;
}

/* =========== Material icons =========== */
.back-invoice-overview.material-symbols-outlined {
    font-size: 1.1rem;
}

/* =========== Local checkout screens =========== */
.checkout {
    .card-footer {
        background-color: transparent;
        border-top: none;
    }

    .card {
        border-radius: .4rem;
    }

    body {
        background-color: #f8f9fa;
    }

    .btn-outline-light {
        border-color: #454d55;
    }

    .btn-outline-light:hover svg {
        fill: #292b2c !important;
    }

    .btn-outline-light:hover p {
        color: #292b2c !important;
    }

	.checkout-label {
		display: block;
		margin-bottom: .25rem;
		line-height: 18px;
		font-size: .93rem;
		color: rgb(48, 49, 61, 0.95);
		font-weight: 500;
	}

	.form-control {
		height: inherit;
		line-height: 2em;
		border-radius: 8px;
		border: 1px solid #e6e6e6;
	}

	input:focus, #au-bank-account-element.StripeElement--focus {
		outline: 0px;
		border-color: #0570de !important;
		box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 6px rgba(0, 0, 0, 0.02), 0 0 0 3px hsla(210, 96%, 45%, 25%), 0 1px 1px 0 rgba(0, 0, 0, 0.08) !important;
	}

	.checkout-label.heavy {
		font-weight: 700;
		font-size: 1em;
	}

	.split-content {
		display: flex;
		justify-content: space-between;
		width: 100%;
		align-items: center;
	}

	.account-details {
		margin: 2em 0;
	}

	.form-group.invalid input, #au-bank-account-element.StripeElement--invalid {
		box-shadow: none;
		color: #eb1c26;
		border-color: #eb1c26;
	}

	.form-group.invalid input::placeholder, #au-bank-account-element.StripeElement--invalid::placeholder {
		color: #eb1c26;
	}

	.invalid-message {
		display: block;
		color: #eb1c26;
		font-size: 0.8rem;
		transition-property: margin-top, height;
		transition-duration: 0.35s;
		overflow: hidden;
	}

	@media (min-width: 768px) {
		.left-container {
			justify-content: flex-end !important;
		}

		.right-container {
			justify-content: flex-start !important;
		}
	}

	@media (max-width: 768px) {
		.left-container, .right-container {
			justify-content: center !important;
		}
	}
}