/* Jewellery Price Calculator - Frontend Styles v1.6.5 */

.jpc-price-breakup {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.jpc-price-breakup h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.jpc-price-breakup-table {
    width: 100%;
    border-collapse: collapse;
}

.jpc-price-breakup-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.jpc-price-breakup-table tr:last-child {
    border-bottom: none;
}

.jpc-price-breakup-table td {
    padding: 8px 0;
}

.jpc-price-breakup-table td:first-child {
    color: #666;
    font-weight: 500;
}

.jpc-price-breakup-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #333;
}

.jpc-price-breakup-table .total-row td {
    padding-top: 12px;
    font-size: 18px;
    color: #000;
    border-top: 2px solid #333;
}

.jpc-price-breakup-table .discount-row td {
    color: #46b450;
}

.jpc-price-breakup-table .discount-row .discount-percentage {
    color: #46b450;
    font-weight: 700;
    font-size: 14px;
    margin-left: 5px;
}

.jpc-price-breakup-table .discount-row .discount-amount {
    color: #46b450;
    font-weight: 700;
}

.jpc-price-breakup-table .gst-row td {
    color: #666;
    font-size: 14px;
}

/* REMOVED ELEMENTOR ACCORDION FIX - It was affecting WooCommerce tabs */
/* Users should add custom CSS to their theme if needed */

/* STANDARD ACCORDION FIX (for non-Elementor themes) */
details.jpc-detailed-breakup {
    margin: 20px 0;
}

details.jpc-detailed-breakup summary {
    cursor: pointer;
    padding: 12px 15px 12px 45px;
    background: #f0f0f0;
    border-radius: 4px;
    font-weight: 600;
    list-style: none;
    position: relative;
    user-select: none;
    transition: background 0.3s ease;
}

/* Hide browser default markers */
details.jpc-detailed-breakup summary::-webkit-details-marker {
    display: none;
}

details.jpc-detailed-breakup summary::marker {
    display: none;
    content: '';
}

/* PLUS sign when CLOSED */
details.jpc-detailed-breakup:not([open]) > summary::before {
    content: '+';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    font-weight: bold;
    color: #333;
    line-height: 1;
    font-family: Arial, sans-serif;
}

/* MINUS sign when OPEN */
details.jpc-detailed-breakup[open] > summary::before {
    content: '−';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    font-weight: bold;
    color: #333;
    line-height: 1;
    font-family: Arial, sans-serif;
}

details.jpc-detailed-breakup summary:hover {
    background: #e0e0e0;
}

details.jpc-detailed-breakup summary:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.jpc-detailed-breakup-content {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: #fff;
}

/* Fix for sticky product details - prevent overlap */
.product .summary.entry-summary,
.woocommerce div.product div.summary {
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
}

/* Ensure product tabs don't get stuck */
.woocommerce-tabs {
    position: relative !important;
    z-index: 1 !important;
}

/* Discount Badge on Product Page */
.jpc-discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #fff;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 15px;
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(253, 160, 133, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(253, 160, 133, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(253, 160, 133, 0.6);
    }
}

.jpc-discount-badge .discount-icon {
    margin-right: 5px;
    font-size: 16px;
}

/* Metal Rates Display */
.jpc-metal-rates {
    margin: 20px 0;
}

.jpc-metal-rates-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jpc-metal-rates-list li {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
}

.jpc-metal-rates-list li:last-child {
    border-bottom: none;
}

.jpc-metal-name {
    font-weight: 600;
    color: #333;
}

.jpc-metal-price {
    color: #46b450;
    font-weight: 700;
}

/* Metal Rates Table */
.jpc-metal-rates-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.jpc-metal-rates-table th,
.jpc-metal-rates-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.jpc-metal-rates-table th {
    background: #f0f0f0;
    font-weight: 600;
}

.jpc-metal-rates-table tr:hover {
    background: #f9f9f9;
}

/* Metal Rates Marquee */
.jpc-metal-rates-marquee {
    background: #333;
    color: #fff;
    padding: 10px 0;
    overflow: hidden;
}

.jpc-metal-rates-marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.jpc-metal-rates-marquee-item {
    display: inline-block;
    padding: 0 30px;
}

/* Shortcode Styles */
.jpc-shortcode-wrapper {
    margin: 20px 0;
}

.jpc-calculator-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
}

.jpc-form-row {
    margin-bottom: 15px;
}

.jpc-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.jpc-form-row input,
.jpc-form-row select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.jpc-calculate-btn {
    background: #2271b1;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.jpc-calculate-btn:hover {
    background: #135e96;
}

.jpc-result {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.jpc-result-price {
    font-size: 24px;
    font-weight: 700;
    color: #46b450;
}
