/* custom-offers-styles.css */

/* Toast Notification Styles */
.offer-toast {
    position: fixed;
    top: 32px;
    right: 20px;
    z-index: 999999;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-size: 14px;
    max-width: 300px;
    display: none;
    opacity: 0.95;
    transition: all 0.3s ease;
}

.offer-toast.success {
    background-color: #0aab67;
    color: white;
    border-left: 4px solid #088f56;
}

.offer-toast.error {
    background-color: #d63638;
    color: white;
    border-left: 4px solid #b32d2e;
}

/* For WordPress admin bar compatibility */
@media screen and (max-width: 782px) {
    .offer-toast {
        top: 46px;
    }
}

#wpadminbar .gd-custom-offers-menu-notification-counter,
#wpadminbar .gd-custom-offers-menu-notification-indicator {
    background-color: #d63638 !important;
    color: #ffffff !important;
}
#wpadminbar .gd-custom-offers-menu-notification-counter {
    display: inline-block !important;
    min-width: 18px !important;
    height: 18px !important;
    border-radius: 9px !important;
    margin: 7px 0 0 2px !important;
    vertical-align: top !important;
    font-size: 11px !important;
    line-height: 1.6 !important;
    text-align: center !important;
}

.inbox-all a {
    background-color: #0aab67 !important;
    color: #fff !important;;
}

.awaiting-reply a {
    background-color: #A3CB38 !important;
    color: #fff !important;
}

.status-awaiting_reply {
    background-color: #A3CB38 !important;
    color: #fff !important;
}

.offer-status-select option[value="awaiting_reply"] {
    background-color: #A3CB38;
    color: #fff;
}

.general-inquiry a {
    background-color: #FFC312 !important;
    color: #fff !important;
}

.offers a {
    background-color: #EE5A24 !important;
    color: #fff !important;;
}

.need-chase a {
    background-color: #ED4C67 !important;
    color: #fff !important;;
}

.no-longer-interested a {
    background-color: #9B59B6 !important;
    color: #fff !important;;
}

.out-of-stock a {
    background-color: #8395A7 !important;
    color: #fff !important;;
}
.wp-admin .filters ul li a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 3px;
    margin: 2px 0;
}

.wp-admin ul li a:hover {
    opacity: 0.85;
}

.wp-admin .filters li.active a {
    box-shadow: inset 0 0 3px rgba(0,0,0,0.2);
    border: 1px solid #333;
}

.gd-offers-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.wp-list-table.widefat {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

.wp-list-table th.column-product_thumb,
.wp-list-table td.column-product_thumb {
    width: 60px;
    text-align: center;
}

.wp-list-table th.column-price,
.wp-list-table td.column-price {
    width: 100px;
}

.wp-list-table th.column-offer_comment,
.wp-list-table td.column-offer_comment {
    word-wrap: break-word;
    width: 250px;
}

@media screen and (max-width: 782px) {
    .wp-list-table th.column-phone,
    .wp-list-table td.column-phone {
        display: none;
    }

}

.single-comments-textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    resize: vertical;
}

.offer-status-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 5px;
    border-radius: 4px;
}

/* Status colors for dropdowns */
.offer-status-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 5px;
    border-radius: 4px;
}

/* Default status - awaiting reply */
.status-awaiting_reply {
    background-color: #A3CB38 !important;
    color: #fff !important;
}

/* General enquiry */
.status-general_enquiry {
    background-color: #FFC312 !important;
    color: #fff !important;
}

/* Offers */
.status-offers {
    background-color: #EE5A24 !important;
    color: #fff !important;
}

/* Needs chase */
.status-needs_chase {
    background-color: #ED4C67 !important;
    color: #fff !important;
}

/* Not interested */
.status-not_interested {
    background-color: #9B59B6 !important;
    color: #fff !important;
}

/* Out of stock */
.status-outofstock {
    background-color: #8395A7 !important;
    color: #fff !important;
}

/* Make sure the option is also styled when selected */
.offer-status-select option {
    background-color: #fff;
    color: #000;
}

.offer-status-select option[value="awaiting_reply"] {
    background-color: #A3CB38;
    color: #fff;
}

.offer-status-select option[value="general_enquiry"] {
    background-color: #FFC312;
    color: #fff;
}

.offer-status-select option[value="offers"] {
    background-color: #EE5A24;
    color: #fff;
}

.offer-status-select option[value="needs_chase"] {
    background-color: #ED4C67;
    color: #fff;
}

.offer-status-select option[value="not_interested"] {
    background-color: #9B59B6;
    color: #fff;
}

.offer-status-select option[value="outofstock"] {
    background-color: #8395A7;
    color: #fff;
}

.comment-wrapper {
    position: relative;
}

.save-comment-btn {
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #0aab67;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.save-comment-btn:hover {
    background-color: #0aab67;
}

.wp-list-table {
    .column-product_thumb {
        width: 150px !important;

        .offer-table-thumb {
            width: 100%;
            max-width: 150px;

            img {
                border-radius: 10px !important;
                width: 100%;
                height: auto;
                max-width: 100%;
                display: block;
                object-fit: contain;
            }
        }
    }
}
