/* Make an Offer Button */
.wcmo-button {
    margin-left: 0 !important;
    margin-right: 10px !important;
    background: none !important;
    border: solid 1px #C6A758 !important;
    color: black !important;
    &:hover {
        color: #C6A758 !important;
    }
}

.wcmo-button:disabled,
.wcmo-button:disabled:hover {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    background-color: #e0e0e0 !important;
    color: #a0a0a0 !important;
    cursor: not-allowed;
    border-color: #e0e0e0 !important;
}

/* ** Tooltip Styles ** */
.wcmo-tooltip-container {
    position: relative;
    display: inline-block;
}

.wcmo-tooltip-container .wcmo-tooltip-text {
    visibility: hidden;
    width: max-content;
    max-width: 220px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position the tooltip above the button */
    left: 50%;
    margin-left: -110px; /* Use half of the max-width to center the tooltip */
    opacity: 0;
    transition: opacity 0.3s;
    .woocommerce-Price-amount {
        color: #fff !important;
    }
}

.wcmo-tooltip-container .wcmo-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%; /* At the bottom of the tooltip */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.wcmo-tooltip-container:hover .wcmo-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Modal Overlay */
#wcmo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Modal Container */
#wcmo-modal-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 500px;
    position: relative;
    animation: wcmo-slide-down 0.3s ease-out;
}

@keyframes wcmo-slide-down {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* Modal Header */
#wcmo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

#wcmo-modal-header h2 {
    margin: 0;
    font-size: 1.25em;
}

#wcmo-modal-close-btn {
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0;
}

#wcmo-modal-close-btn:hover {
    color: #333;
}

/* Modal Body */
#wcmo-modal-body {
    padding: 20px 25px 30px;
}

#wcmo-modal-body p {
    margin-top: 0;
}

.wcmo-form-row {
    margin-bottom: 20px;
}

.wcmo-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.wcmo-form-row input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#wcmo-submit-offer-btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
}

/* Message Styles */
#wcmo-modal-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.wcmo-success {
    background-color: #e5f5e6;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.wcmo-error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

.woocommerce-account .woocommerce-MyAccount-content table.wcmo-offers-table {
    width: 100%;
    margin-bottom: 2em;
}

.wcmo-offers-table th, .wcmo-offers-table td {
    text-align: left;
    vertical-align: middle;
}

.wcmo-offers-table .wcmo-product-name a {
    font-weight: bold;
}

.wcmo-offers-table .wcmo-actions .wcmo-action-btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

.wcmo-status {
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9em;
    text-transform: capitalize;
}
.wcmo-status.status-pending, .wcmo-status.status-countered { background-color: #f8b422; }
.wcmo-status.status-accepted, .wcmo-status.status-counter-accepted { background-color: #0080ff; }
.wcmo-status.status-completed, .wcmo-status.status-counter-completed { background-color: #2ea82e ; }
.wcmo-status.status-declined, .wcmo-status.status-counter-declined { background-color: #d63638; }

.wcmo-counter-form {
    display: none;
    padding-top: 10px;
    border-top: 1px solid #eee;
    margin-top: 10px;
}
.wcmo-counter-form .form-row {
    display: flex;
    align-items: center;
}
.wcmo-counter-form input {
    width: 160px !important;
    margin-right: 10px !important;
}
.wcmo-status.status-expired { background-color: #777; }
