/**
 * Frontend Styles
 *
 * @package JewelleryPriceEngine
 */

/* Price Breakup Table */
.jpe-price-breakup {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.jpe-price-breakup h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.jpe-breakup-table {
    width: 100%;
    border-collapse: collapse;
}

.jpe-breakup-table tbody tr {
    border-bottom: 1px solid #e1e1e1;
}

.jpe-breakup-table tbody tr:last-child {
    border-bottom: none;
}

.jpe-breakup-table td {
    padding: 10px 5px;
    vertical-align: middle;
}

.jpe-breakup-table td:first-child {
    font-weight: 500;
    color: #555;
}

.jpe-breakup-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #333;
}

.jpe-breakup-table .jpe-discount-row {
    color: #28a745;
}

.jpe-breakup-table .jpe-discount-row td {
    color: #28a745;
}

.jpe-breakup-table .jpe-total-row {
    border-top: 2px solid #333;
    background: #fff;
}

.jpe-breakup-table .jpe-total-row td {
    padding: 15px 5px;
    font-size: 16px;
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .jpe-price-breakup {
        padding: 15px;
    }

    .jpe-breakup-table td {
        padding: 8px 3px;
        font-size: 14px;
    }

    .jpe-breakup-table .jpe-total-row td {
        font-size: 15px;
    }
}

/* Popup Button */
.jpe-popup-button-container {
    margin: 20px 0;
}

.jpe-open-popup {
    background: #0071a1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.jpe-open-popup:hover {
    background: #005177;
    color: #fff;
}

/* Modal */
.jpe-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

.jpe-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.jpe-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
    border-bottom: 2px solid #0071a1;
    padding-bottom: 10px;
}

.jpe-modal-close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.jpe-modal-close:hover,
.jpe-modal-close:focus {
    color: #000;
}

.jpe-modal-body {
    margin-top: 10px;
}

/* Modal inside table styles */
.jpe-modal .jpe-breakup-table {
    background: #f9f9f9;
    border-radius: 4px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .jpe-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .jpe-modal-content h3 {
        font-size: 18px;
    }
}