/* EK Price Admin Styles */

/* Top price info section styling - matching ek-user plugin exactly */
.ek-price-info-top {
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4fd 100%);
    border: 1px solid #c3d9ff;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.1);
    position: relative;
    overflow: hidden;
}

.ek-price-info-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0073aa, #005a87);
}

.ek-price-info-top h3 {
    margin-top: 0 !important;
    margin-bottom: 15px;
    color: #0073aa;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #d0e4f5;
    padding-bottom: 10px;
}

.ek-price-info-top .form-table {
    margin: 0;
    background: transparent;
}

.ek-price-info-top .form-table th {
    width: 150px;
    padding-left: 0;
    font-weight: 600;
    color: #2c3e50;
}

.ek-price-info-top .form-table td {
    padding-left: 0;
}

/* Enhanced input styling in top section */
.ek-price-info-top input[type="text"],
.ek-price-info-top input[type="number"],
.ek-price-info-top select {
    border: 2px solid #d5e5f5;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.ek-price-info-top input[type="text"]:focus,
.ek-price-info-top input[type="number"]:focus,
.ek-price-info-top select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
}

/* Responsive design for price info */
@media (max-width: 782px) {
    .ek-price-info-top {
        padding: 15px;
        margin: 15px 0;
    }
    
    .ek-price-info-top h3 {
        font-size: 15px;
    }
    
    .ek-price-info-top .form-table th {
        width: auto;
        padding-bottom: 5px;
    }
}

#ek-price-discounts {
    margin-top: 20px;
}

#ek-price-discounts h3 {
    margin-bottom: 15px;
    color: #23282d;
    font-size: 1.3em;
}

/* Hierarchical category dropdown styling */
.ek-price-info-top select.discount-category,
.ek-price-info-top select#new-discount-category {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    min-width: 200px;
}

.ek-price-info-top select.discount-category option,
.ek-price-info-top select#new-discount-category option {
    padding: 6px 8px;
    line-height: 1.5;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', monospace;
}

/* "All Categories" option styling */
.ek-price-info-top select.discount-category option[value=""],
.ek-price-info-top select#new-discount-category option[value=""] {
    font-weight: 600;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Category options with values */
.ek-price-info-top select.discount-category option[value]:not([value=""]),
.ek-price-info-top select#new-discount-category option[value]:not([value=""]) {
    color: #2c3e50;
    font-size: 13px;
}

/* Improve readability of hierarchical structure */
.ek-price-info-top select.discount-category,
.ek-price-info-top select#new-discount-category {
    background-color: #fff;
    border: 2px solid #d5e5f5;
    padding: 8px 12px;
    border-radius: 4px;
}

/* Default styling for discounts container */
#ek-price-discounts-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background-color: #fafafa;
    margin-bottom: 20px;
}

/* Enhanced styling when inside top section */
.ek-price-info-top #ek-price-discounts-container {
    border: 2px solid #d5e5f5;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
}

.ek-price-discount-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Enhanced styling for discount rows in top section */
.ek-price-info-top .ek-price-discount-row {
    border: 2px solid #d0e4f5;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
}

.ek-price-discount-row:last-child {
    margin-bottom: 0;
}

.ek-price-discount-row input[type="number"] {
    width: 80px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.ek-price-discount-row select {
    min-width: 150px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    background-color: #fff;
}

.ek-price-discount-row span {
    font-weight: bold;
    color: #666;
    margin-right: 10px;
}

.ek-price-discount-row .button {
    padding: 5px 12px;
    font-size: 13px;
    line-height: 1.4;
    min-height: auto;
}

.ek-price-update-discount {
    background-color: #0085ba;
    border-color: #0073aa;
    color: #fff;
}

.ek-price-update-discount:hover {
    background-color: #0073aa;
    border-color: #006799;
}

.ek-price-delete-discount {
    background-color: #dc3232;
    border-color: #ba2626;
    color: #fff;
}

.ek-price-delete-discount:hover {
    background-color: #ba2626;
    border-color: #9e2124;
}

#ek-price-new-discount {
    border-top: 2px solid #0085ba;
    padding-top: 20px;
}

/* Enhanced styling when inside top section */
.ek-price-info-top #ek-price-new-discount {
    border-top: 2px solid #0073aa;
}

#ek-price-new-discount h4 {
    margin-bottom: 15px;
    color: #0085ba;
    font-size: 1.1em;
}

/* Enhanced h4 styling when inside top section */
.ek-price-info-top #ek-price-new-discount h4 {
    color: #0073aa;
}

#ek-price-new-discount .ek-price-discount-row {
    background-color: #f0f8ff;
    border: 2px dashed #0085ba;
}

/* Enhanced new discount row styling when inside top section */
.ek-price-info-top #ek-price-new-discount .ek-price-discount-row {
    background-color: rgba(240, 248, 255, 0.8);
    border: 2px dashed #0073aa;
}

#ek-price-add-discount {
    background-color: #00a32a;
    border-color: #00a32a;
    color: #fff;
    font-weight: 600;
}

#ek-price-add-discount:hover {
    background-color: #008a20;
    border-color: #008a20;
}

/* Copy discounts section */
#ek-price-copy-discounts {
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

/* Enhanced styling when inside top section */
.ek-price-info-top #ek-price-copy-discounts {
    border: 2px solid #d0e4f5;
    background-color: rgba(240, 248, 255, 0.7);
}

#ek-price-copy-discounts h4 {
    margin-bottom: 15px;
    color: #0085ba;
    font-size: 1.1em;
}

/* Enhanced h4 styling when inside top section */
.ek-price-info-top #ek-price-copy-discounts h4 {
    color: #0073aa;
}

#ek-price-copy-discounts select {
    min-width: 200px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    background-color: #fff;
}

#ek-price-copy-discounts-btn {
    background-color: #0085ba;
    border-color: #0073aa;
    color: #fff;
    font-weight: 600;
}

#ek-price-copy-discounts-btn:hover {
    background-color: #0073aa;
    border-color: #006799;
}

#ek-price-copy-discounts-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.ek-price-message {
    margin: 15px 0;
    padding: 10px 15px;
    border-left: 4px solid;
    border-radius: 3px;
}

.ek-price-message.notice-success {
    background-color: #d4edda;
    border-color: #00a32a;
    color: #155724;
}

.ek-price-message.notice-error {
    background-color: #f8d7da;
    border-color: #dc3232;
    color: #721c24;
}

/* Frontend discount info */
.ek-price-discount-info {
    margin: 15px 0;
    padding: 10px 15px;
    background-color: #e8f5e8;
    border: 1px solid #00a32a;
    border-radius: 4px;
}

.ek-price-discount-text {
    margin: 0;
    color: #155724;
    font-size: 14px;
}

.ek-price-discount-text strong {
    color: #00a32a;
}

/* Cart discount info */
.ek-price-cart-discount {
    color: #00a32a;
    font-weight: 600;
}

/* Enhanced sale price styling for WooCommerce */
.woocommerce .price del .woocommerce-Price-amount,
.woocommerce div.product .price del .woocommerce-Price-amount {
    color: #999 !important;
    text-decoration: line-through;
    font-size: 0.9em;
}

.woocommerce .price ins .woocommerce-Price-amount,
.woocommerce div.product .price ins .woocommerce-Price-amount {
    color: #d4351c !important;
    font-weight: 600;
    text-decoration: none;
}

.woocommerce .price ins,
.woocommerce div.product .price ins {
    background: none;
    text-decoration: none;
}

/* Price display improvements */
.woocommerce .price,
.woocommerce div.product .price {
    font-size: 1.2em;
    margin-bottom: 0.5em;
}

/* Shop and archive pages */
.woocommerce ul.products li.product .price del .woocommerce-Price-amount {
    color: #999 !important;
    font-size: 0.85em;
}

.woocommerce ul.products li.product .price ins .woocommerce-Price-amount {
    color: #d4351c !important;
    font-weight: 600;
}

/* Cart and checkout page styling */
.woocommerce-cart table.cart td.product-price del,
.woocommerce-checkout table.shop_table td del,
.woocommerce-cart table.cart td.product-subtotal del,
.woocommerce-checkout table.shop_table td.product-subtotal del {
    color: #999 !important;
    text-decoration: line-through;
    font-size: 0.9em;
    margin-right: 8px;
}

.woocommerce-cart table.cart td.product-price ins,
.woocommerce-checkout table.shop_table td ins,
.woocommerce-cart table.cart td.product-subtotal ins,
.woocommerce-checkout table.shop_table td.product-subtotal ins {
    background: none !important;
    text-decoration: none !important;
    color: #d4351c !important;
    font-weight: 600;
}

/* Cart item price styling */
.woocommerce table.shop_table del .woocommerce-Price-amount {
    color: #999 !important;
}

.woocommerce table.shop_table ins .woocommerce-Price-amount {
    color: #d4351c !important;
    font-weight: 600;
}

/* Mini cart widget styling */
.woocommerce.widget_shopping_cart .cart_list li del,
.woocommerce .widget_shopping_cart .cart_list li del {
    color: #999 !important;
    font-size: 0.85em;
    margin-right: 5px;
}

.woocommerce.widget_shopping_cart .cart_list li ins,
.woocommerce .widget_shopping_cart .cart_list li ins {
    background: none !important;
    text-decoration: none !important;
    color: #d4351c !important;
    font-weight: 600;
}

/* Enhanced mini cart price styling */
.ek-mini-cart-price {
    display: inline-block;
    font-size: 0.9em;
}

.ek-mini-cart-price del {
    color: #999 !important;
    text-decoration: line-through;
    margin-right: 4px;
    font-size: 0.9em;
}

.ek-mini-cart-price ins {
    background: none !important;
    text-decoration: none !important;
    color: #d4351c !important;
    font-weight: 600;
}

/* Mini cart quantity and price layout */
.woocommerce.widget_shopping_cart .cart_list li .quantity,
.woocommerce .widget_shopping_cart .cart_list li .quantity {
    color: #666;
    font-size: 0.9em;
    margin-right: 5px;
}

/* Header mini cart (dropdown) styling */
.woocommerce-mini-cart .ek-mini-cart-price del {
    color: #999 !important;
    font-size: 0.85em;
}

.woocommerce-mini-cart .ek-mini-cart-price ins {
    color: #d4351c !important;
    font-weight: 600;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .ek-price-discount-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .ek-price-discount-row input[type="number"],
    .ek-price-discount-row select {
        width: 100%;
        min-width: auto;
    }
    
    .ek-price-discount-row .button {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Loading states */
.ek-price-discount-row .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form validation */
.ek-price-discount-row input[type="number"]:invalid {
    border-color: #dc3232;
    box-shadow: 0 0 2px rgba(220, 50, 50, 0.3);
}

/* Hover effects */
.ek-price-discount-row:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

/* Empty state */
#ek-price-discounts-container:empty::before {
    content: "No discounts set for this user yet.";
    color: #666;
    font-style: italic;
    display: block;
    text-align: center;
    padding: 20px;
}

/* Description styling */
.form-table .description {
    color: #666;
    font-size: 13px;
    margin-top: 10px;
    line-height: 1.4;
} 