/* Custom Customer Pricing Frontend Styles */

/* Price display improvements */
.price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.custom-customer-pricing-for-woocommerce-original-price,
.custom-customer-pricing-for-woocommerce-final-price {
    display: block;
    text-align: center;
    margin: 0.25em 0;
}

.custom-customer-pricing-for-woocommerce-original-price del {
    color: #999;
    text-decoration: line-through;
}

.custom-customer-pricing-for-woocommerce-final-price ins {
    color: #46b450;
    text-decoration: none;
    font-weight: bold;
}

/* Frontend UI container styles */
#thaxamccp-frontend-app {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-size: 14px;
    line-height: 1.4;
}

/* Frontend shortcode typography fixes */
#thaxamccp-frontend-app h1 {
    font-size: 16px !important;
    margin: 0 0 16px 0 !important;
    font-weight: 600 !important;
}

#thaxamccp-frontend-app h2,
#thaxamccp-frontend-app h3,
#thaxamccp-frontend-app h4,
#thaxamccp-frontend-app h5,
#thaxamccp-frontend-app h6 {
    font-size: 16px !important;
    margin: 0 0 12px 0 !important;
    font-weight: 600 !important;
}

#thaxamccp-frontend-app p,
#thaxamccp-frontend-app div,
#thaxamccp-frontend-app span,
#thaxamccp-frontend-app label {
    font-size: 14px !important;
    line-height: 1.4 !important;
}

#thaxamccp-frontend-app .thaxamccp-table th,
#thaxamccp-frontend-app .thaxamccp-table td {
    font-size: 13px !important;
    padding: 8px !important;
}

#thaxamccp-frontend-app input,
#thaxamccp-frontend-app select,
#thaxamccp-frontend-app textarea,
#thaxamccp-frontend-app button {
    font-size: 14px !important;
}

#thaxamccp-frontend-app .button {
    font-size: 14px !important;
    padding: 6px 12px !important;
}

#thaxamccp-frontend-app .thaxamwrap {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Loader styles for frontend */
#thaxamccp-loader {
    color: #666;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
    padding: 20px;
}

#thaxamccp-loader .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Frontend table responsiveness */
@media (max-width: 768px) {
    #thaxamccp-frontend-app {
        padding: 10px;
    }
    
    #thaxamccp-frontend-app .thaxamwrap {
        padding: 15px;
    }
    
    .thaxamccp-table {
        font-size: 12px;
    }
    
    .thaxamccp-table th,
    .thaxamccp-table td {
        padding: 6px;
    }
}

/* Ensure frontend UI elements don't conflict with theme styles */
#thaxamccp-frontend-app * {
    box-sizing: border-box;
}

#thaxamccp-frontend-app input,
#thaxamccp-frontend-app select,
#thaxamccp-frontend-app button {
    font-family: inherit;
}

/* Custom price labels in cart */
.thaxamccp-custom-price-label {
    color: #46b450;
    font-style: italic;
    font-size: 0.9em;
}

/* Warning label styling for minimum requirement messages - Modern icon with tooltip */
.thaxamccp-minimum-requirement-message {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #856404;
    padding: 6px;
    margin: 0 0 0 8px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    cursor: default; /* changed from help to default to disable pointer cursor */
    position: relative;
    transition: all 0.3s ease;
    height: 24px;
    overflow: visible;
    white-space: nowrap;
}

/* Removed tooltip content and hover styles to disable tooltip */
.thaxamccp-minimum-requirement-message::after,
.thaxamccp-minimum-requirement-message:hover::after,
.thaxamccp-minimum-requirement-message::after::before {
    content: none !important;
    display: none !important;
    pointer-events: none !important;
}

.thaxamccp-minimum-requirement-message::before {
    content: "⚠️";
    font-size: 14px;
    margin-right: 0;
}

/* Ensure the message doesn't break product grid layouts */
.woocommerce ul.products li.product .thaxamccp-minimum-requirement-message,
.woocommerce-page ul.products li.product .thaxamccp-minimum-requirement-message {
    position: absolute;
    top: 8px;
    right: 8px;
    margin: 0;
}

/* Single product page positioning - fully expanded without collapse functionality */
.woocommerce div.product .thaxamccp-minimum-requirement-message {
    display: block !important;
    margin: 10px 0 0 0;
    max-width: none !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    white-space: normal !important;
    overflow: visible !important;
    cursor: default !important;
}

/* Shop page inline positioning for warning icon - float right */
.woocommerce ul.products li.product .price .thaxamccp-minimum-requirement-message,
.woocommerce-page ul.products li.product .price .thaxamccp-minimum-requirement-message {
    position: static;
    display: inline-flex;
    margin: 0 0 0 8px;
    vertical-align: middle;
    top: auto;
    right: auto;
    float: right;
    margin-left: auto;
}

/* Global discount message styling */
.thaxamccp-global-discount-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    display: block;
    clear: both;
}

.thaxamccp-global-discount-message::before {
    content: "💰";
    margin-right: 8px;
    font-size: 16px;
}

/* Responsive warning messages */
@media (max-width: 768px) {
    .thaxamccp-minimum-requirement-message,
    .thaxamccp-global-discount-message {
        font-size: 13px;
        padding: 10px 12px;
    }
}

