/* 
 * My Account Quotes Endpoint 
 */

/* 
 * Single Quote View
 */

/* Core Layout */
.pri-qu-quote {
    display:flex;
    flex-flow:column nowrap;
    row-gap:2em;
}
.pri-qu-quote .navigation {
    display:flex;
    flex-flow:row nowrap;
    font-size:0.9em;
    justify-content:space-between;
}
.pri-qu-quote .header .title {
    font-size:1.5em;
    font-weight:700;
    text-align:center;
    color:var(--text-color);
    padding-bottom:0.8em;
}
table.dataTable td,
table.dataTable th {
  white-space: normal;
  word-break: break-word; /* helps for long product names/links */
}
.no-results-row {
    padding-top:1em;
}
.checkout-item .item-qty,
.checkout-item .item-price {
    color:var(--white);
}
.acknowledgement-order-summary .order-totals {
    border-top:2px solid var(--mid-blue-2);
}
.required {
    color:var(--pink);
}

/* Fieldsets */
fieldset.pri-qu-card {
    min-width:0;
    padding: 1em;
    padding-bottom:1.4em;
	border: 1px solid var(--border-color);
	border-radius: 5px;
	box-shadow: var(--box-shadow-default);
}
fieldset.pri-qu-card legend {
	color: var(--text-color);
	font-weight: 700;
	font-size: 16px;
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
}
.pri-qu-fieldset.card-child {
	padding: 1em;
	border: 1px solid var(--bg-light-color);
	border-radius: 5px;
	box-shadow: none;
}
.pri-qu-fieldset.card-child legend {
	color: var(--text-light-color);
	font-weight: 700;
	font-size: 16px;
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
}
.card-parent {
	display: flex;
	flex-flow: column nowrap;
	row-gap: 2em;
}
.card-child {
    display: flex;
	flex-flow: column nowrap;
	row-gap: 1em;
}
a.icon-only,
button.icon-only {
    border: 0;
    background-color: transparent;
    padding: 0;
    margin: 0;
    font-size:1.1em;
}
.icon-only.view-pdf {
    color:var(--dark-pri-blue);
}
.icon-only-view-quote {
    color:var(--bg-color);
}
.icon-only.pri-qu-buy-now {
    color:var(--purple);
}
.icon-only:hover {
    color:var(--gray);
    cursor:pointer;
}
.icon-only.pri-qu-update-expired {
    color:var(--orange);
}
.icon-only.pri-qu-share-guest-link {
    color:var(--yellow);
}
.woocommerce-order-addreses .addresses {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    padding: 15px;
}
.woocommerce-order-addreses .addresses fieldset {
    border: 1px solid var(--mid-blue-2);
    border-radius: 5px;
    padding: 10px;
}
.woocommerce-order-addreses .addresses fieldset legend {
    font-size: 1.2em;
    color: var(--mid-blue-2);
    font-weight:700;
}
body.woocommerce-order-received .hide-on-order-received {
	display:none;
}
body.woocommerce-checkout:not(.woocommerce-order-received) .hide-on-checkout {
    display: none;
}

/* Grids */
.pri-grid-wrapper .row {
    display:grid;
}
.pri-grid-wrapper .header .row {
    font-weight: 700;
    background-color: var(--mid-blue-2);
    align-items: center;
    color: var(--dark-pri-blue);
    border-bottom: 2px solid var(--dark-pri-blue);
    border-top: 2px solid var(--dark-pri-blue);
    padding: 5px;
    font-size: 1em;
}
.pri-grid-wrapper .body .row {
    padding:5px;
}
.pri-grid-wrapper.quote-list-grid .body .row {
    padding:10px 5px;
    align-items:center;
}
.pri-grid-wrapper .body .row:not(.totals):nth-child(even) {
    background-color: #eee;
}
.pri-grid-wrapper .body .row {
    border-bottom: 1px solid var(--mid-blue-1);
}
.pri-grid-wrapper .body .row.subtotal {
    border-top:2px solid var(--mid-blue-1);
}
.pri-grid-wrapper .body .totals .col {
    color:var(--dark-pri-blue);
}
.pri-grid-wrapper .body .totals .col.totals-label {
    font-weight:700;
}
.pri-grid-wrapper .body .totals.total{
    font-weight:700;
    font-size:1.1em;
    border-bottom:2px solid var(--button-bg-color);
    background-color:var(--bg-color);
}
.pri-grid-wrapper .body .totals .col.discount-amount {
    color:var(--pink);
}
.pri-grid-wrapper .body .totals .col .detail {
    font-style:italic;
    font-weight:400;
    font-size:0.9em;
}
.col.flex-col {
    display:flex;
    flex-flow:column wrap;
    row-gap:0.3em;
}
.col.flex-col.align-center {
    align-items:center;
}
.quote-list-grid {
    font-size:0.85em;
}
.quote-list-grid .row {
    grid-template-columns: 0.8fr 0.8fr 0.6fr 1.1fr 1.1fr 1fr;
    column-gap:5px;
}
.quote-grid .row {
    grid-template-columns:repeat(auto-fill, minmax(31%, 1fr));
}
.quote-grid.quote-lead-grid .row {
    grid-template-columns:repeat(auto-fill, minmax(23%, 1fr));
}
.address-grid .row {
    grid-template-columns:repeat(auto-fill, minmax(48%, 1fr));
}
.items-grid .row {
    grid-template-columns: 0.14fr 0.5fr 1fr 0.3fr 0.3fr;
    column-gap:5px;
}
.items-grid .row.totals .totals-label {
    grid-column: 2/5;
}
.pri-grid-wrapper .row .col {
    text-align:center;
}
.pri-grid-wrapper .row .col.center {
    text-align:center;
}
.pri-grid-wrapper .row .col.left {
    text-align:left;
}
.pri-grid-wrapper .row .col.right {
    text-align:right;
}
.pri-grid-wrapper .row .col .description {
    text-align:left;
}
.pri-grid-wrapper .row .col .htc {
    font-size:0.8em;
    text-align:left;
    white-space:nowrap;
    padding:0.2em 0;
}
.pri-grid-wrapper .notes-wrapper {
    display:flex;
    flex-flow:column nowrap;
    row-gap:1em;
}
fieldset[data-card="items"] .body .row {
    font-size:0.9em;
}

details.terms summary {
    background-color: var(--button-bg-color);
    color: var(--white);
    font-size: 1.1em;
    font-weight: 700;
    padding: 0.5em;
    border-radius: 5px;
}
details.terms summary:hover {
    background-color:var(--bg-color);
    color:var(--text-color);
    cursor:pointer;
}
.terms-wrap {
    font-size: 0.9em;
    margin-top:1em;
    padding:0 0.3em;
}
.terms-title {
    font-size: 1.2em;
    font-weight: 700;
    margin: 4px 0 12px;
    color: var(--dark-pri-blue);
}
.terms-wrap p {
    color: var(--gray);
}
.terms-section {
    font-weight: 700;
    margin: 14px 0 6px;
    color: var(--mid-blue-1);
}
.quote-list-grid .body .col[data-label="Actions"] {
    display:flex;
    flex-flow:row nowrap;
    align-items:center;
    justify-content:center;
    column-gap:0.5em;
}
.quote-list-grid .body .col[data-label="Actions"] a {
    flex-basis:1.6em;
}
.notes-wrapper {
    font-size:0.9em;
    display:flex;
    flex-flow:column nowrap;
    row-gap:0.5em;
}
.pri-qu-c2c-wrapper {
	display: flex;
    flex-flow: column nowrap;
    row-gap: 1em;
	font-size:0.9em;
	color:var(--white);
}
.pri-qu-c2c-wrapper .row {
	display: flex;
    flex-flow: row nowrap;
    column-gap: 1em;
    justify-content: space-between;
}
.pri-qu-cart-quote-message-mini-cart,
.pri-qu-cart-quote-message-checkout,
.pri-qu-cart-quote-message-cart {
	display:flex;
	flex-flow:row nowrap;
	border:1px solid var(--orange);
	border-radius:5px;
	background-color:var(--light-orange);
	color:var(--orange);
	font-weight:700;
	align-items:center;
	padding:0.5em;
}
.pri-qu-cart-quote-btn[disabled] {
	cursor:not-allowed;
	opacity:0.5;
}
.pri-qu-cart-quote-btn {
    max-height:fit-content;
    max-width:fit-content;
}
[data-grid-element="checkout-discounts"] {
    grid-template-columns: 0.5fr 1fr;
}
#order_review .discounts .title {
    display: flex;
    flex-flow: column nowrap;
}
#order_review .discounts .title .label {
    font-weight: 400;
    white-space: nowrap;
    font-size: 0.9em;
    font-style: italic;
}
#order_review .discounts .discount-value {
    font-style:italic;
    color:var(--mid-blue-2);
}
#order_review .shipping .title {
    white-space:nowrap;
}
/*#payment .form-row.place-order {
    visibility:hidden;
    display:none;
}*/
.pri-qu-container {
    display:flex;
    flex-flow:column nowrap;
    row-gap:2em;
}
.pri-qu-badge {
	display:inline-block;
	padding:2px 8px;
	border-radius:18px;
	font-size:11px;
	line-height:1.6;
	font-weight:700;
    display: flex;
    align-items: center;
    justify-content: center;
    border:1px solid var(--border-color);
    background-color:var(--bg-light-color);
    color:var(--text-color);
}
.pri-qu-badge:hover {
    opacity:0.5;
    cursor:pointer;
}
.pri-qu-badge.my-account-quote {
    justify-self:center;
    margin:auto auto;
    font-size:1em;
    margin-bottom:1em;
}
.pri-qu-badge.my-account-quote:hover {
    border-width:1px;
}
.required-field {
	color: var(--pink);
	font-size: 0.7em;
}


/* ==========================================================================
   Quote and Pay Link Modal (Guest Payment)
   ========================================================================== */

/* Base overlay: full-screen, hidden by default */
.pri-qu-guest-pay-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    z-index: 9999;

    display: none; /* overridden when .is-visible and aria-hidden="false" */

    /* Center the modal within the viewport */
    display: none; /* fallback; see .is-visible below for flex */
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.45);

    /* Allow scrolling if modal is taller than viewport on small screens */
    overflow-y: auto;
}

/* Hidden state (explicit) */
.pri-qu-guest-pay-overlay[aria-hidden="true"] {
    display: none;
}

/* Visible state – flex centering + overlay */
.pri-qu-guest-pay-overlay.is-visible[aria-hidden="false"] {
    display: flex;
}
.pri-qu-guest-pay-modal input[type="text"], .pri-qu-guest-pay-modal input[type="text"] {
    padding:2px 5px;
}
/* Modal shell */
.pri-qu-guest-pay-modal {
    box-sizing: border-box;
    width: 100%;
    max-width: 640px;
    margin: 2rem 1.5rem; /* breathing room on small screens */
    background-color: var(--white);
    border-radius: 5px;
    border: 1px solid var(--dark-pri-blue);
    box-shadow: var(--box-shadow);
    overflow: hidden;

    /* In case overlay scrolls, keep modal visually distinct */
    position: relative;
}

/* Header */
.pri-qu-guest-pay-header {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;

    padding: 10px 14px;

    background-color: var(--dark-pri-blue);
    color: var(--white);
}

.pri-qu-guest-pay-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--white);
}

.pri-qu-guest-pay-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: none;
    background: transparent;
    cursor: pointer;

    color: var(--white);
}

/* Body */
.pri-qu-guest-pay-body {
    padding: 1em 1.25em 1.4em 1.25em;
    display: flex;
    flex-flow: column nowrap;
    row-gap: 2em;
    min-height:445px;
}

/* Field layout helpers */
.field-group.row {
    display: flex;
    flex-flow: row nowrap;
    gap: 1em;
    justify-content: space-between;
}

.field-group.col {
    display: flex;
    flex-flow: column nowrap;
    gap: 1em;
}

.field.inline-input {
    display: flex;
    flex-flow: row nowrap;
    column-gap: 1em;
    align-items: center;
    margin-left: 1em;
}

.pri-qu-guest-pay-modal .field {
    display: flex;
    flex-flow: column nowrap;
    row-gap: 0.5em;
    flex-grow: 1;
}

.field label {
    font-weight: 700;
    color: var(--gray);
}

/* Inputs + buttons inside modal */
.pri-qu-guest-pay-modal input {
    min-height: 35px;
    border-radius: 5px;
}

.pri-qu-guest-pay-body button {
    margin-top: auto;
    min-width: 122px;
}

.pri-qu-guest-pay-modal .desktop-flex-end {
    align-self: flex-end;
}

/* Status line */
.pri-qu-guest-pay-status {
    margin-top: 0.75em;
    font-size: 0.9rem;
}

/* Optional: color states if you want them here
   (or rely on existing .pri-qu-error / .pri-qu-success styles) */
.pri-qu-guest-pay-status.pri-qu-success {
    color: var(--green);
}

.pri-qu-guest-pay-status.pri-qu-error {
    color: var(--red);
}

.pri-qu-guest-pay-status.pri-qu-info {
    color: var(--dark-pri-blue);
}

/* Guest Pay Landing */

.page-id-259927 .entry-title.main_title {
    display:none;
}
body.page-id-259927:not(.et-tb) #main-content .container {
    padding-top:2.5%;
}
.gp-quote-details-grid .row {
    grid-template-columns:repeat(auto-fit, minmax(19%, 1fr));
    align-items:center;
}
.gp-quote-status {
    max-width:fit-content;
}
.gp-quote-details-grid .col.quote-status {
    margin:auto auto;
}
.pri-qu-gp-landing {
    display:flex;
    flex-flow:column nowrap;
    row-gap:2em;
}
.pri-qu-gp-error.container {
    margin: auto auto;
    display:flex;
    flex-flow:column nowrap;
    row-gap:1em;
    justify-content:center;
    align-items:center;
}
.pri-qu-gp-error .message {
    padding: 1em;
    border: 1px solid var(--text-color);
    background-color: var(--bg-light-color);
    color: var(--text-color);
    font-weight: 700;
    max-width: fit-content;
    border-radius:5px;
    box-shadow:var(--box-shadow-default);
}
.pri-qu-gp-landing form {
    display:flex;
    flex-flow:column nowrap;
    row-gap:1em;
}
.pri-qu-gp-landing input {
    min-height:36px;
    width:100%;
    border-radius:5px;
    padding:2px 5px !important;
    border-color:var(--mid-blue-1);
}
.pri-qu-gp-options-row {
    display:flex;
    flex-flow:row nowrap;
    column-gap:2em;
}
.pri-qu-gp-landing .login-page {
    width:100%;
}
.pri-qu-is-guest-purchase #pri-checkout-row-woo-notices,
.pri-qu-is-guest-purchase .woocommerce-account-fields,
.pri-qu-is-guest-purchase .pri-qu-gp-hide {
    display:none;
    visibility:hidden;
}

@media screen and (max-width:500px) {
    .quote-list-grid .row {
        grid-template-columns:1fr;
    }
    .quote-list-grid .row {
        display: flex;
        flex-flow: column nowrap;
        row-gap: 0.5em;
    }
    .quote-list-grid .body .row .col[data-label="Quote #"] {
        font-weight:700;
    }
    .field-group.row.responsive {
		flex-flow: column nowrap;
		align-items: center;
	}

	.field-group.row.responsive button {
		align-self: unset;
	}
	.pri-qu-guest-pay-modal {
        max-width: 100%;
        margin: 1.5rem 1rem;
    }

    .field-group.row {
        flex-direction: column;
    }
}
