/*===================================================
    Volume Calculator Popup Styles
====================================================*/

/* Calculator Modal */
#calculatorModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

#calculatorModal2 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Calculator Container */
.calculator-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.4s ease;
}

/* Calculator Header */
.calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
    border-radius: 15px 15px 0 0;
}

.calculator-header h2 {
    margin: 0;
    color: white;
    font-size: 22px;
    font-weight: 700;
}

.calculator-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.calculator-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

/* Calculator Body */
.calculator-body {
    padding: 30px 25px;
}

#calc-inputs {
    display: block;
}

/* Form Field */
.calc-field {
    margin-bottom: 20px;
}

.calc-field label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calc-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.calc-input:focus {
    outline: none;
    border-color: #0056b3;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.calc-unit {
    color: #666;
    font-weight: 600;
    font-size: 13px;
    min-width: 40px;
    text-align: center;
    padding: 12px 8px;
}

/* Separator */
.calc-separator {
    margin: 25px 0;
    border: none;
    border-top: 2px dashed #e0e0e0;
}

/* Info Box */
.calc-info-box {
    background: #e8f4fd;
    border-left: 4px solid #0056b3;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #003d82;
    line-height: 1.5;
}

.calc-info-box strong {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

/* Button Group */
.calc-button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 25px;
}

.calc-button-group.single {
    grid-template-columns: 1fr;
}

#calculateBtn,
#resetCalcBtn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

#calculateBtn {
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
    color: white;
}

#calculateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.4);
}

#calculateBtn:active {
    transform: translateY(0);
}

#resetCalcBtn {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #e0e0e0;
}

#resetCalcBtn:hover {
    background: #e8e8e8;
    border-color: #d0d0d0;
}

/* Calculation Result */
.calculation-result {
    animation: slideDown 0.4s ease;
}

.result-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.result-header h3 {
    margin: 0;
    color: #003d82;
    font-size: 18px;
    font-weight: 700;
}

.result-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    color: #555;
}

.detail-value {
    font-weight: 700;
    color: #003d82;
    font-size: 15px;
}

.detail-row.highlight {
    background: #f0f7ff;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 10px 0;
    border: none;
}

.detail-row.highlight .detail-value {
    color: #0056b3;
}

.detail-row.final-price {
    background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border: none;
}

.detail-row.final-price .detail-label,
.detail-row.final-price .detail-value {
    color: white;
}

.detail-row.final-price .detail-value {
    font-size: 24px;
    font-weight: 800;
}

.result-details hr {
    border: none;
    border-top: 2px dashed #e0e0e0;
    margin: 15px 0;
}

/* Result Actions */
.result-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.result-actions .default-btn {
    display: inline-block;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.result-actions .default-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.4);
}

/* Responsive */
@media (max-width: 600px) {
    .calculator-popup {
        max-width: 95%;
        border-radius: 12px;
    }

    .calculator-header {
        padding: 20px;
    }

    .calculator-header h2 {
        font-size: 18px;
    }

    .calculator-body {
        padding: 20px;
    }

    .calc-button-group {
        grid-template-columns: 1fr;
    }

    .detail-row.final-price .detail-value {
        font-size: 20px;
    }
}

/* Utility Button for opening calculator */
.calculator-trigger {
    cursor: pointer;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.calculator-trigger:hover {
    text-decoration: none;
}

/* Button styles for calculator buttons */
.btn-calc {
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    width: 100% !important;
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%) !important;
    color: white !important;
}
