/* Bookbound RFQ Frontend Styles */

.bookbound-rfq-price-label {
    font-weight: 600;
    color: #2271b1;
    font-size: 14px;
}

/* Quote form page */
.bookbound-rfq-summary {
    margin-bottom: 30px;
}

.bookbound-rfq-school-name {
    margin: 20px 0 5px;
    font-size: 1.1em;
    color: #333;
}

.bookbound-rfq-total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding: 15px;
    background: #f8f8f8;
    border: 2px solid #ddd;
    border-radius: 3px;
    font-size: 1.15em;
}

.bookbound-rfq-items {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.bookbound-rfq-items th,
.bookbound-rfq-items td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.bookbound-rfq-items thead th {
    background: #f8f8f8;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.bookbound-rfq-items tfoot td {
    border-top: 2px solid #ddd;
    font-size: 1.1em;
}

.bookbound-rfq-extras {
    list-style: none;
    margin: 5px 0 0;
    padding: 0;
    font-size: 13px;
}

.bookbound-rfq-extras li {
    padding: 3px 0;
    color: #555;
}

.rfq-extra-price {
    color: #888;
    font-size: 12px;
}

/* Quantity inputs */
.rfq-qty-input {
    width: 65px;
    padding: 6px 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    -moz-appearance: textfield;
}

.rfq-qty-input:focus {
    border-color: #0504aa;
    outline: none;
    box-shadow: 0 0 0 1px #0504aa;
}

.rfq-qty-input::-webkit-inner-spin-button,
.rfq-qty-input::-webkit-outer-spin-button {
    opacity: 1;
}

/* Remove item button */
.rfq-col-remove {
    width: 30px;
    text-align: center;
}

.rfq-remove-item {
    color: #c00;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    display: inline-block;
}

.rfq-remove-item:hover {
    color: #900;
}

/* Update Quote button */
.bookbound-rfq-update-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
}

#rfq_update_quote {
    padding: 8px 20px;
    font-size: 14px;
}

.rfq-update-message {
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 3px;
}

.rfq-update-message.success {
    color: #155724;
    background: #d4edda;
}

.rfq-update-message.error {
    color: #721c24;
    background: #f8d7da;
}

.rfq-update-message.notice {
    color: #856404;
    background: #fff3cd;
}

/* Coupon section */
.bookbound-rfq-coupon-wrap {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

.bookbound-rfq-coupon-wrap h4 {
    margin: 0 0 12px;
    font-size: 1em;
}

.bookbound-rfq-coupon-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.bookbound-rfq-coupon-form input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    text-transform: uppercase;
}

.bookbound-rfq-coupon-form input[type="text"]:focus {
    border-color: #0504aa;
    outline: none;
    box-shadow: 0 0 0 1px #0504aa;
}

.bookbound-rfq-coupon-form .button {
    padding: 10px 20px;
    white-space: nowrap;
}

.bookbound-rfq-coupon-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 14px;
}

.bookbound-rfq-coupon-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bookbound-rfq-coupon-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.bookbound-rfq-coupon-applied {
    margin-top: 10px;
}

.rfq-coupon-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8e8f5;
    color: #0504aa;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
}

.rfq-coupon-discount-text {
    font-weight: 400;
    color: #555;
}

#rfq_remove_coupon {
    color: #c00;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    margin-left: 4px;
}

#rfq_remove_coupon:hover {
    color: #900;
}

/* Discount + new total in quote box */
.bookbound-rfq-discount {
    display: flex;
    justify-content: space-between;
    color: #c00;
    font-size: 1em;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px dashed #ddd;
}

.bookbound-rfq-new-total {
    display: flex;
    justify-content: space-between;
    color: #0504aa;
    font-size: 1.1em;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 2px solid #0504aa;
}

/* Form */
.bookbound-rfq-form-wrap {
    max-width: 600px;
    margin-top: 30px;
    padding: 25px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

.bookbound-rfq-form-wrap h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

#bookbound-rfq-form .form-row {
    margin-bottom: 15px;
}

#bookbound-rfq-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

#bookbound-rfq-form input[type="text"],
#bookbound-rfq-form input[type="email"],
#bookbound-rfq-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

#bookbound-rfq-form input:focus,
#bookbound-rfq-form textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

#bookbound-rfq-form .required {
    color: #e00;
}

.bookbound-rfq-submit {
    margin-top: 20px;
}

.bookbound-rfq-submit .button {
    padding: 12px 30px;
    font-size: 16px;
}

.bookbound-rfq-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 3px;
}

.bookbound-rfq-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

/* Empty state */
.bookbound-rfq-empty {
    text-align: center;
    padding: 40px 20px;
}

.bookbound-rfq-empty .button {
    margin-top: 15px;
}

/* RFQ product page adjustments */
.bookbound-rfq-product .single_add_to_cart_button {
    background-color: #2271b1 !important;
}

/* Form row layout */
#bookbound-rfq-form .form-row-first,
#bookbound-rfq-form .form-row-last {
    display: inline-block;
    width: 48%;
    vertical-align: top;
}

#bookbound-rfq-form .form-row-first {
    margin-right: 3%;
}

@media (max-width: 600px) {
    #bookbound-rfq-form .form-row-first,
    #bookbound-rfq-form .form-row-last {
        display: block;
        width: 100%;
        margin-right: 0;
    }
}

/* Request a Quote table — book cover thumbnails */
.bookbound-rfq-items .rfq-col-thumb { width: 56px; }
.bookbound-rfq-items .rfq-item-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 58px;
    border: 1px solid #e6e6ef;
    border-radius: 5px;
    overflow: hidden;
    background: #f5f5fb;
}
.bookbound-rfq-items .rfq-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 600px) {
    .bookbound-rfq-items .rfq-col-thumb,
    .bookbound-rfq-items .rfq-item-thumb { width: 40px; }
    .bookbound-rfq-items .rfq-item-thumb { height: 52px; }
}
