/* Frontend Styles for Measurement & Size Price Calculator - Premium Style */

.ms-calc-optional-toggle-wrapper {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f8f7ff;
    border: 1px solid #e0d9ff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.ms-calc-optional-toggle-label {
    cursor: pointer;
    font-weight: 600;
    color: #4a3e7a;
    display: flex;
    align-items: center;
    font-size: 1.05em;
}

.ms-calc-optional-toggle-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ms-calc-calculator-box {
    background: #ffffff;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.ms-calc-calculator-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 700;
    color: #222;
    border-bottom: 2px solid #f8f8f8;
    padding-bottom: 10px;
}

.ms-calc-visualizer-container {
    width: 100%;
    height: 160px;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.ms-calc-visualizer-container::after {
    content: "Preview";
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ms-calc-visualizer-shape {
    width: 0px;
    height: 0px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 2px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ms-calc-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.ms-calc-input-row {
    margin-bottom: 0px;
    display: block;
}

.ms-calc-input-label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.ms-calc-input-field {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    color: #333;
}

.ms-calc-input-field:hover {
    border-color: #bbb;
}

.ms-calc-input-field:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.15);
    background: #fff;
    outline: none;
}

.ms-calc-addons-wrapper {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.ms-calc-addons-title {
    font-size: 1.1em;
    margin-bottom: 12px;
    color: #333;
}

.ms-calc-addon-item {
    margin-bottom: 8px;
}

.ms-calc-addon-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95em;
}

.ms-calc-addon-checkbox {
    margin-right: 10px;
}

.ms-calc-addon-price-label {
    color: #888;
    margin-left: 5px;
    font-size: 0.9em;
}

.ms-calc-waste-wrapper {
    margin-top: 20px;
    padding: 12px 15px;
    background: #f0f7ff;
    border: 1px solid #d0e5fd;
    border-radius: 10px;
}

.ms-calc-waste-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #2271b1;
}

.ms-calc-waste-checkbox {
    margin-right: 12px;
}

.ms-calc-total-wrapper {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
}

.ms-calc-total-price {
    font-weight: 800;
    font-size: 1.5em;
    color: #2271b1;
    /* Professional Blue */
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.01);
}

.ms-calc-measurement-summary {
    width: 100%;
    font-size: 0.85em;
    color: #888;
    margin-top: 8px;
    text-align: right;
    font-style: italic;
}

/* Animations */
@keyframes ms-calcFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#ms-calc_calculator_wrapper {
    animation: ms-calcFadeIn 0.5s ease forwards;
}