/* --- Absolute Validator (Snippet 1) --- */
.mare-error-box {
    background: #ffe5e5;
    color: #d63031;
    padding: 15px;
    border-radius: 8px;
    border-left: 6px solid #d63031;
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 15px;
    display: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* --- CPT Template Select (Snippet 5 styles) --- */

/* Pill button (shortcode output in loop grid) */
.mare-select-btn {
    display: block;
    width: 100%;
    background: #1f1d1d;
    color: #fff;
    border: 1px solid #1f1d1d;
    border-radius: 50px;
    padding: 6px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    overflow: visible;
}

.mare-select-btn:hover {
    background: #2a2725;
    border-color: #2a2725;
}

.mare-select-btn.is-selected {
    background: #322f30;
    border-color: #fff;
}

@media (max-width: 1024px) {
    .mare-select-btn { font-size: 14px; }
}

@media (max-width: 767px) {
    .mare-select-btn { font-size: 13px; padding: 8px 16px; }
}

.mare-btn-check {
    display: inline-block;
    margin-right: 6px;
    font-size: 15px;
    font-weight: 700;
}

/* YES/NO dropdown below pill button */
.mare-select-btn { overflow: visible !important; }

.mare-dropdown-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    background: #1f1d1d;
    border-radius: 0 0 10px 10px;
    width: 100%;
    padding: 10px;
    display: none;
    cursor: default;
}

.mare-header-row {
    display: grid;
    grid-template-columns: 1fr 40px 40px;
    gap: 10px;
    text-align: center;
}

.mare-header-text {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}

.mare-data-row {
    display: grid;
    grid-template-columns: 1fr 40px 40px;
    gap: 10px;
    align-items: center;
}

.mare-label-pill {
    background-color: transparent;
    color: #fff;
    border: none;
    padding: 10px 12px;
    font-size: 12px;
    text-align: center;
    border-radius: 30px;
    font-weight: 500;
    white-space: nowrap;
}

.mare-custom-checkbox {
    position: relative;
    width: 24px;
    height: 24px;
    margin: 0 auto;
}

.mare-sync-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 5;
    margin: 0;
}

.mare-checkmark {
    position: absolute;
    top: 0; left: 0;
    height: 24px; width: 24px;
    border: 1.5px solid #666;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.mare-checkmark:after {
    content: '\2713';
    display: none;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

.mare-sync-input:checked ~ .mare-checkmark { border-color: #fff; background: #322f30; }
.mare-sync-input:checked ~ .mare-checkmark:after { display: block; }

.mare-selection-list {
    margin-bottom: 20px;
}

.mare-empty-list-msg {
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    font-style: italic;
    padding: 8px 0;
}

.mare-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mare-list-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
    background: #2a2725;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-sizing: border-box;
}

.mare-list-thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    border-radius: 2px;
}

.mare-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #3d3633;
}

.mare-list-body {
    flex: 1;
    min-width: 0;
}

.mare-list-title {
    display: block;
    font-size: 14px;
    color: #fff;
    font-weight: 500;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mare-list-hs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mare-hs-label {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin-right: 2px;
}

.mare-hs-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px 2px 2px;
    font-size: 11px;
    font-weight: 500;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: color 0.2s;
}

.mare-hs-btn:focus,
.mare-hs-btn:active,
.mare-hs-btn:focus-visible {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.mare-hs-btn::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #666;
    flex-shrink: 0;
    transition: 0.2s;
    box-sizing: border-box;
}

.mare-hs-btn.active {
    color: #fff;
}

.mare-hs-btn.active::before {
    border-color: #fff;
    background: #fff;
    box-shadow: inset 0 0 0 3px #1a1614;
}

.mare-list-remove {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    flex-shrink: 0;
    transition: color 0.2s;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mare-list-remove:hover,
.mare-list-remove:focus,
.mare-list-remove:active,
.mare-list-remove:focus-visible {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: #fff;
}

/* SELECT button selected state */
.mare-select-btn.is-selected {
    background-color: #322f30 !important;
    color: #fff !important;
    border-color: #fff !important;
}

/* --- Upload Addon (Snippet 3) --- */
[class*="upload-box-"] {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    position: relative;
    box-sizing: border-box;
    transition: 0.3s;
    overflow: visible;
    cursor: pointer;
}

.mare-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    width: 100%;
    margin-top: 15px;
    text-align: left;
    box-sizing: border-box;
    order: 2;
    position: relative;
    z-index: 20; 
}

.mare-preview-item, .mare-add-more {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid #3d3633;
    background: #1a1614;
    cursor: grab;
    transition: 0.2s;
    box-sizing: border-box;
}

.mare-add-more {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #555;
    cursor: pointer;
    font-size: 30px;
    color: #888;
}

.mare-add-more:hover {
    border-color: #fff;
    color: #fff;
    background: #25201d;
}

.mare-preview-item:active { cursor: grabbing; }
.mare-preview-item.dragging { opacity: 0.4; transform: scale(0.95); }
.mare-preview-item.drag-over { border: 2px dashed #fff; opacity: 0.8; }

.mare-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.mare-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff4747;
    color: #fff;
    border: none;
    border-radius: 50% !important;
    width: 22px !important;
    height: 22px !important;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 35;
    padding: 0 !important;
    box-sizing: border-box;
    transition: 0.2s;
}
.mare-preview-remove:hover { transform: scale(1.1); background: #ff6060; }

.mare-preview-number {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 5;
    pointer-events: none;
}

.has-files .u-icon, .has-files p { visibility: hidden; opacity: 0; position: absolute; pointer-events: none; }

/* --- Cart Counter (Part 2) --- */
.mare-cart-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    cursor: pointer;
}

.mare-cart-icon {
    color: currentColor;
    display: block;
}

.mare-cart-badge {
    position: absolute;
    bottom: -4px;
    right: -8px;
    background: #1a1614;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 3px;
    box-sizing: border-box;
    pointer-events: none;
}

/* --- Side Cart (Part 3) --- */

.mare-side-cart {
    position: fixed;
    inset: 0;
    z-index: 999998;
    pointer-events: none;
}

.mare-side-cart.is-open {
    pointer-events: auto;
}

.mare-cart-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.mare-side-cart.is-open .mare-cart-overlay {
    opacity: 1;
}

.mare-cart-panel {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 45%;
    max-width: 100vw;
    background: #fff;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 32px rgba(0,0,0,0.12);
}

.mare-side-cart.is-open .mare-cart-panel {
    transform: translateX(0);
}

body.mare-cart-open { overflow: hidden; }

/* Close button — absolute top-right of panel */
.mare-cart-close {
    position: absolute;
    top: 22px;
    right: 28px;
    z-index: 10;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 28px;
    color: #1d1d1d !important;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    transition: color 0.2s, opacity 0.2s;
}
.mare-cart-close:hover,
.mare-cart-close:focus,
.mare-cart-close:active {
    color: #555 !important;
    opacity: 1 !important;
    background: none !important;
    box-shadow: none !important;
}

/* Decorative header (title with lines + intro) */
.mare-cart-header {
    padding: 86px 120px 39px;
    text-align: center;
    border-bottom: none;
}

.mare-cart-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 34px;
}

.mare-cart-title-line {
    flex: 1;
    height: 1.5px;
    background: #1a1614;
    display: block;
}

.mare-cart-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1614;
    margin: 0;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
}

.mare-cart-intro {
    font-size: 15px;
    color: #333;
    line-height: 1.8;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.mare-cart-body {
    padding: 36px 120px 70px;
    flex: 1;
}

.mare-sc-section { margin-bottom: 4px; }

.mare-sc-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #777 !important;
    margin: 0 0 29px;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.mare-sc-optional {
    font-size: 14px;
    font-weight: 500;
    color: #cc3300;
    letter-spacing: 0;
}

.mare-sc-note {
    font-size: 13px;
    color: #aaa;
    margin: -8px 0 12px;
    letter-spacing: 0.01em;
}

.mare-sc-divider {
    border: none;
    border-top: 2px solid #7f7c7d;
    margin: 30px 0;
}

.mare-sc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mare-sc-grid--5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.mare-sc-field {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Hide any browser-extension injected siblings next to inputs (TempMail, LastPass, etc.) */
.mare-sc-field > *:not(label):not(input):not(textarea) {
    display: none !important;
}

.mare-sc-full { width: 100%; }

.mare-sc-field label {
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 12px;
    display: block;
    letter-spacing: 0.02em;
}

#mare-request-form input:not([type="radio"]),
#mare-request-form textarea {
    width: 100%;
    border: 1px solid #bcbcbc !important;
    border-radius: 4px !important;
    padding: 12px 14px !important;
    font-size: 13px !important;
    color: #1d1d1d !important;
    background: #fff !important;
    outline: none !important;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none !important;
}

#mare-request-form input:not([type="radio"])::placeholder,
#mare-request-form textarea::placeholder {
    color: #bbb !important;
    font-size: 12px !important;
}

#mare-request-form input:not([type="radio"]):focus,
#mare-request-form textarea:focus {
    border-color: #aaa !important;
    box-shadow: none !important;
}

.upload-box-sc {
    border: 1.5px dashed #d8d8d8;
    background: #fafafa;
    border-radius: 6px;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    cursor: pointer;
    font-size: 13px;
    color: #aaa;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.upload-box-sc:hover { border-color: #999; }
.upload-box-sc p { margin: 0; line-height: 1.8; color: #888; font-size: 14px; }
.upload-box-sc small { font-size: 11px; color: #bbb; }

/* Template list inside side cart inherits the embedded form's own dark styles */

.mare-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1d;
    margin-top: 6px;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.01em;
}

.mare-total-count {
    font-size: 16px;
    font-weight: 700;
    color: #1d1d1d;
}

.mare-sc-headshot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.mare-sc-headshot-label {
    font-size: 13px;
    color: #444 !important;
    font-family: 'Poppins', sans-serif;
}

.mare-sc-radios {
    display: flex;
    align-items: center;
    gap: 24px;
}

.mare-sc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 8px;
    gap: 12px;
}

/* Hide any injected 3rd-party element (Elementor close btn, browser extension, etc.) */
.mare-sc-footer > *:not(.mare-sc-logout-btn):not(.mare-sc-submit-btn) {
    display: none !important;
    visibility: hidden !important;
}

.mare-sc-logout-btn,
.mare-sc-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 19px 28px;
    background: #322d2f;
    color: #fff !important;
    border: none !important;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none !important;
    line-height: 1;
    box-sizing: border-box;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    transition: background 0.2s;
}

.mare-sc-logout-btn:hover,
.mare-sc-submit-btn:hover { background: #4a4345; color: #fff !important; }

.mare-sc-submit-btn:focus,
.mare-sc-submit-btn:active { background: #333; box-shadow: none !important; outline: none !important; }
.mare-sc-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* White-context overrides for template list inside the request form cart */
.mare-request-form-wrap .mare-empty-list-msg {
    color: #bbb;
    font-size: 12px;
    font-style: normal;
    padding: 12px 0;
}

.mare-request-form-wrap .mare-list-item {
    border-bottom: 2px solid #7f7c7d;
    padding: 18px 0;
    gap: 14px;
}

.mare-request-form-wrap .mare-list-thumb {
    background: #f5f5f5;
    width: 64px;
    height: 64px;
    border-radius: 3px;
    padding: 3px;
}

.mare-request-form-wrap .mare-list-title {
    color: #1d1d1d;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0;
}

.mare-request-form-wrap .mare-list-remove {
    color: #aaa;
    font-size: 13px;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.mare-request-form-wrap .mare-list-remove:hover,
.mare-request-form-wrap .mare-list-remove:focus {
    color: #1d1d1d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Upload preview grid in white context */
.mare-request-form-wrap .mare-preview-item,
.mare-request-form-wrap .mare-add-more {
    border-color: #e0e0e0;
    background: #f7f7f7;
}

.mare-request-form-wrap .mare-add-more {
    border-color: #ccc;
    color: #aaa;
}

.mare-request-form-wrap .mare-add-more:hover {
    border-color: #666;
    color: #666;
    background: #ececec;
}

/* Headshot radio buttons — scoped to #mare-request-form to beat input-rule specificity */
#mare-request-form .mare-sc-radio-label input[type="radio"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    border: 1.5px solid #c0c0c0 !important;
    border-radius: 50% !important;
    background: #fff !important;
    cursor: pointer !important;
    position: relative !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    vertical-align: middle;
}

#mare-request-form .mare-sc-radio-label input[type="radio"]:checked {
    border-color: #1d1d1d !important;
    background: #1d1d1d !important;
    box-shadow: inset 0 0 0 4px #fff !important;
}

#mare-request-form .mare-sc-radio-label input[type="radio"]:hover:not(:checked) {
    border-color: #888 !important;
}

.mare-sc-radio-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    color: #444 !important;
    cursor: pointer !important;
    font-family: 'Poppins', sans-serif !important;
    user-select: none !important;
}

@media (max-width: 1024px) {
    .mare-cart-body { padding: 32px 52px 56px; }
    .mare-cart-header { padding: 60px 52px 32px; }
}

@media (max-width: 767px) {
    .mare-cart-panel { width: 100vw; }
    .mare-cart-body { padding: 28px 24px 40px; }
    .mare-cart-header { padding: 48px 24px 28px; }
    .mare-cart-close { top: 18px; right: 20px; font-size: 24px; }
    .mare-sc-grid { grid-template-columns: 1fr; }
    .mare-sc-grid--5 { grid-template-columns: repeat(3, 1fr); }
    .mare-sc-footer { flex-direction: column; gap: 10px; }
    .mare-sc-logout-btn, .mare-sc-submit-btn { width: 100%; justify-content: center; }
}

