/* Matheria Offers — visual language aligned with the Matheria theme */
.matheria-offer-box{margin-top:24px;padding:0;border:0;background:transparent;color:#171717;font-family:inherit}

.matheria-offer-toggle{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 28px;border:1px solid #b68a3a;border-radius:0;background:transparent;color:#171717;font-family:inherit;font-size:15px;font-weight:500;cursor:pointer;transition:all .2s ease}
.matheria-offer-toggle:hover{background:#b68a3a;border-color:#b68a3a;color:#fff;transform:translateY(-1px)}

.matheria-offer-form-wrap{margin-top:22px;padding:30px 32px 28px;border:1px solid rgba(182,138,58,.7);border-radius:0;background:rgba(255,252,246,.92);box-shadow:none}
.matheria-offer-form-wrap h3{margin:0 0 10px;color:#171717;font-family:Georgia,"Times New Roman",serif;font-size:34px;font-weight:400;line-height:1.15}
.matheria-offer-form-wrap>p{max-width:720px;margin:0 0 24px;color:#37332d;font-size:15px;line-height:1.65}

.matheria-offer-form{display:grid;grid-template-columns:1fr 1fr;column-gap:26px;row-gap:0;max-width:100%}
.matheria-offer-form .matheria-offer-field{margin:0 0 18px}
.matheria-offer-form .matheria-offer-field-full{grid-column:1 / -1}
.matheria-offer-form label{display:block;color:#171717;font-size:14px;font-weight:500}
.matheria-offer-form input,.matheria-offer-form textarea{width:100%;box-sizing:border-box;margin-top:7px;padding:11px 12px;border:1px solid #cfc8bc;border-radius:0;background:#fff;color:#171717;font-family:inherit;font-size:15px;line-height:1.4;outline:none;transition:border-color .2s ease,box-shadow .2s ease}
.matheria-offer-form input::placeholder,.matheria-offer-form textarea::placeholder{color:#9b958b;opacity:1}
.matheria-offer-form input:focus,.matheria-offer-form textarea:focus{border-color:#b68a3a;box-shadow:0 0 0 2px rgba(182,138,58,.12)}
.matheria-offer-form textarea{min-height:94px;resize:vertical}

/* Match the main WooCommerce purchase CTA: same visual weight and gold accent. */
.matheria-offer-form .button.alt{display:inline-flex;align-items:center;justify-content:center;min-height:48px;margin-top:0;padding:0 28px;border:1px solid #b68a3a;border-radius:0;background:#b68a3a;color:#171717;font-family:inherit;font-size:15px;font-weight:500;cursor:pointer;transition:all .2s ease}
.matheria-offer-form .button.alt:hover{background:#9e752f;border-color:#9e752f;color:#fff;transform:translateY(-1px)}

@media (max-width:768px){
    .matheria-offer-form-wrap{padding:24px 20px}
    .matheria-offer-form-wrap h3{font-size:28px}
    .matheria-offer-form{grid-template-columns:1fr;column-gap:0}
    .matheria-offer-form .matheria-offer-field-full{grid-column:auto}
    .matheria-offer-toggle,.matheria-offer-form .button.alt{width:100%}
}

/* Final CTA normalization: force the offer submit button to use the same
   visual language as the WooCommerce Add to cart button in the Matheria theme. */
.matheria-offer-form button[type="submit"],
.matheria-offer-form button.button.alt,
.matheria-offer-form .button.alt {
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 210px !important;
    height: 56px !important;
    min-height: 56px !important;
    margin: 4px 0 0 !important;
    padding: 0 24px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffb74d !important;
    color: #111 !important;
    font-family: inherit !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background-color .2s ease, transform .2s ease !important;
}

.matheria-offer-form button[type="submit"]:hover,
.matheria-offer-form button.button.alt:hover,
.matheria-offer-form .button.alt:hover {
    background: #e6a33f !important;
    color: #111 !important;
    transform: translateY(-1px) !important;
}

@media (max-width:768px){
    .matheria-offer-form button[type="submit"],
    .matheria-offer-form button.button.alt,
    .matheria-offer-form .button.alt {
        width: 100% !important;
    }
}


/* 0.1.5: absolute CTA normalization. The theme currently overrides the
   submit button, so this selector intentionally mirrors the Matheria
   WooCommerce purchase CTA with maximum specificity. */
.single-product .matheria-offer-box .matheria-offer-form button.matheria-offer-submit[type="submit"],
.single-product .matheria-offer-box .matheria-offer-form button.matheria-offer-submit.button.alt {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 210px !important;
    height: 56px !important;
    min-width: 210px !important;
    min-height: 56px !important;
    max-width: 210px !important;
    margin: 4px 0 0 !important;
    padding: 0 24px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffb74d !important;
    color: #111 !important;
    font-family: inherit !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: background-color .2s ease, transform .2s ease !important;
}

.single-product .matheria-offer-box .matheria-offer-form button.matheria-offer-submit[type="submit"]:hover,
.single-product .matheria-offer-box .matheria-offer-form button.matheria-offer-submit.button.alt:hover {
    background: #e6a33f !important;
    color: #111 !important;
    transform: translateY(-1px) !important;
}

@media (max-width:768px){
    .single-product .matheria-offer-box .matheria-offer-form button.matheria-offer-submit[type="submit"],
    .single-product .matheria-offer-box .matheria-offer-form button.matheria-offer-submit.button.alt {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}


/* 0.2.4 — CRM detail view */
.matheria-offers-admin .detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:12px 0 20px}.matheria-offers-admin .detail-head h1{margin:0 0 5px}.matheria-offers-admin .detail-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:18px}.matheria-offers-admin .detail-card{background:#fff;border:1px solid #dcdcde;border-radius:6px;padding:20px;box-shadow:0 1px 2px rgba(0,0,0,.03);margin-bottom:18px}.matheria-offers-admin .detail-card h2{margin:0 0 14px;font-size:19px}.matheria-offers-admin .detail-card h3{margin:0 0 8px;font-size:14px}.matheria-offers-admin .detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 18px}.matheria-offers-admin .detail-card .big{font-size:24px;font-weight:600}.matheria-offers-admin .customer-large{font-size:18px;font-weight:600;margin-bottom:8px}.matheria-offers-admin .timeline{position:relative;margin-left:7px}.matheria-offers-admin .timeline:before{content:"";position:absolute;left:6px;top:7px;bottom:7px;width:2px;background:#eadfc9}.matheria-offers-admin .timeline-item{position:relative;display:flex;gap:16px;padding:0 0 22px}.matheria-offers-admin .timeline-dot{position:relative;z-index:1;width:14px;height:14px;min-width:14px;margin-top:4px;border-radius:50%;background:#c8953e;border:3px solid #fff;box-shadow:0 0 0 1px #c8953e}.matheria-offers-admin .timeline-title{font-size:15px;margin-bottom:3px}.matheria-offers-admin .timeline-item p{margin:7px 0 0}.matheria-offers-admin .counter-form{border-top:1px solid #eee;border-bottom:1px solid #eee;padding:15px 0;margin:15px 0;display:flex;flex-direction:column;gap:8px}.matheria-offers-admin .counter-form label{display:flex;flex-direction:column;gap:6px}.matheria-offers-admin .counter-form input{max-width:220px}.matheria-offers-admin .detail-card .button{margin:3px 4px 3px 0}.matheria-offers-admin .detail-head .status{margin-top:8px;font-size:13px;padding:7px 12px}@media(max-width:900px){.matheria-offers-admin .detail-layout{grid-template-columns:1fr}.matheria-offers-admin .detail-grid{grid-template-columns:1fr}}@media(max-width:600px){.matheria-offers-admin .detail-head{flex-direction:column}.matheria-offers-admin .detail-card{padding:15px}}

/* Detail page refinements */
.matheria-offers-admin .detail-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:12px 0 18px}.matheria-offers-admin .detail-head h1{margin:0 0 6px}.matheria-offers-admin .detail-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(300px,1fr);gap:16px}.matheria-offers-admin .detail-layout main,.matheria-offers-admin .detail-layout aside{min-width:0}.matheria-offers-admin .timeline{padding:6px 0}.matheria-offers-admin .timeline-item{position:relative;display:flex;gap:14px;padding:14px 8px 14px 4px;border-bottom:1px solid #eee}.matheria-offers-admin .timeline-item:last-child{border-bottom:0}.matheria-offers-admin .timeline-dot{width:10px;height:10px;min-width:10px;margin:6px 0 0;border-radius:50%;background:#c8953e}.matheria-offers-admin .timeline-title{font-size:14px}.matheria-offers-admin .customer-large{font-size:18px;font-weight:600;margin-bottom:8px}.matheria-offers-admin .action-card .button{margin:0 6px 8px 0}.matheria-offers-admin .action-primary-row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.matheria-offers-admin .button.matheria-accept{background:#1f7a45;border-color:#1f7a45;color:#fff}.matheria-offers-admin .button.matheria-reject{color:#9b1c1c;border-color:#d63638;background:#fff}.matheria-offers-admin .button.matheria-counter{background:#f2e5cf;border-color:#c8953e;color:#5c3b0d}.matheria-offers-admin .counter-form{display:flex;align-items:flex-end;gap:8px;padding:14px 0;border-top:1px solid #eee;margin-top:2px}.matheria-offers-admin .counter-form label{display:block;flex:1}.matheria-offers-admin .counter-form input{display:block;width:100%;margin-top:5px}.matheria-offers-admin .closed-state{padding:12px 14px;background:#f6f7f7;border-left:4px solid #8c8f94}.matheria-offers-admin .order-box{margin-top:12px;padding-top:12px;border-top:1px solid #eee}.matheria-offers-admin .detail-card h2{margin-top:0}@media(max-width:900px){.matheria-offers-admin .detail-layout{grid-template-columns:1fr}}

/* 0.4.0 — internal product management */
.matheria-offers-admin .matheria-internal-card{background:#fffdf7;border-left:4px solid #c8953e}.matheria-offers-admin .internal-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.matheria-offers-admin .internal-grid span{display:block}.matheria-offers-admin .internal-grid strong{display:block;font-size:21px;margin-top:4px}.matheria-offers-admin .matheria-warning{display:inline-block;margin:0 8px 8px 0;padding:7px 10px;background:#fff3cd;color:#6b5200;border-radius:4px;font-weight:600}.matheria-offers-admin .matheria-accept-derogation{background:#8a5a00;border-color:#8a5a00;color:#fff}.matheria-offers-admin .matheria-derogation{padding:10px;background:#fff8e6;border:1px solid #ead7a5}.matheria-offers-admin .matheria-derogation input[type=text]{max-width:360px;margin-top:6px}
