
.calculator-popup-background {
    position: absolute;
    display: none;
    top: 0;
    bottom: 0;
    width: 100%;
    background-color: black;
    opacity: 0.8;
    z-index: 900;
    justify-content: center;
}
.calculator-popup {
    position: fixed; /* change from absolute to fixed */
    display: none;
    z-index: 901;
    top: 50%;          /* center vertically */
    left: 50%;         /* center horizontally */
    transform: translate(-50%, -50%); /* truly center it */
    width: 90%;
    max-width: 1200px;  /* optional, limit max width */
    height: 70%;
    max-height: 700px; /* optional, limit max height */
    background-color: rgb(235, 235, 235);
    border-radius: 25px;
    align-items: center;
    justify-content: center;
}

@media (max-height: 700px) {
    .calculator-popup {
        height: 580px;
    }
}

.calculator-popup-wrap {
    position: relative;
    width: 90%;
    height: 90%;
    row-gap: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calculator-popup__close {
    position: absolute;
    top: 0.81%;
    right: 0;
    width: 25px;
    transition: transform 0.3s ease;
}
.calculator-popup__text {
    font-weight: 500;
    font-size: 30px;
}
.calculator-popup__buttons button {
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 12px;
    font-family: 'Fredoka', Arial, Helvetica, sans-serif;
    font-weight: 600;
    color: #000000;
    background: linear-gradient(145deg, #ffffff, #cdcdcd);
    border: none;
    cursor: pointer;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.25),   /* outer shadow */
        inset 0 0 5px rgba(255, 255, 255, 0.4); /* subtle inner glow */
    transition: transform 0.2s ease, background 0.3s ease, box-shadow 0.2s ease;
}

.calculator-popup-search{
    position: relative;
    width: 100%;
    height: 45px;

    display: flex;
    align-items: center;
}
.popup-search-icon {
    position: absolute;
    left: 10px;
    height: 60%;
    opacity: 0.7;
}
.popup-search-input {
    width: 100%;
    height: 100%;
    padding-left: 35px;
    font-size: 15px;

    border-radius: 10px;
    border: 1.8px solid #e3e3e3;

    background: #fafafa;
    outline: none;
    transition: 0.25s ease;
}
.popup-search-input:hover {
    background: #ffffff;
    border-color: #d5d5d5;
}

.popup-search-input:focus {
    border-color: #ffca00;
    box-shadow: 0 0 6px rgba(255, 200, 0, 0.45);
    background: #ffffff;
}

.calculator-popup__container {
    width: 100%;
    height: 100%;
    background-color: rgb(196, 196, 196);    
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 10px;
    overflow-y: auto;
    
}
.calculator-popup__container-name {
    width: 100%;
    height: 45px;
    background-color: rgb(255, 255, 255);
    border-bottom: 2px solid black;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    font-weight: 500;

    padding-top: 5px;
    padding-bottom: 5px;
}
.calculator-popup__container-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    row-gap: 15px;
    column-gap: 10px;
    width: 95%;
    height: 100%;
    padding-top: 10px; 
}
.popup-container-box-section {
    height: 130px;
    background-color: white;
    border-radius: 10px;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.12),
        inset 0 0 8px rgba(255, 255, 255, 0.4);
    padding: 8px;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    cursor: pointer;
}


.box-section__image-container {
    height: 70%;
    width: 100%;
    background-color: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    padding-top: 4px;
}

.box-section__image {
    width: 60%;
    max-width: 80px;

    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25));
    transition: transform 0.15s ease;
}

.box-section__text-container {
    height: 30%;
    display: flex;
    align-items: top;
    justify-content: center;
    width: 100%;
    padding-top: 2px;

    font-weight: 600;
    font-size: 15px;
    color: #333;
    text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}




























.calculator-popup__close:hover, .calculator-popup__close2:hover {
    transform: scale(1.2);
    cursor: pointer;
}

.calculator-popup__buttons button:hover {
    color: white;
    transform: translateY(-2px) scale(1.05);
    background: linear-gradient(145deg, #265dff, #002eb5);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.3),
        inset 0 0 6px rgba(255, 255, 255, 0.5);
}

.calculator-popup__buttons button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25), inset 0 0 4px rgba(255, 255, 255, 0.3);
}
.popup-container-box-section:hover {
    transform: translateY(-3px);
    box-shadow:
        0 6px 14px rgba(0, 0, 0, 0.2),
        inset 0 0 10px rgba(255, 255, 255, 0.55);
}
.popup-container-box-section:hover {
    transform: translateY(-3px);
    box-shadow:
        0 6px 14px rgba(0, 0, 0, 0.2),
        inset 0 0 10px rgba(255, 255, 255, 0.55);
}
.popup-container-box-section:hover .box-section__image {
    transform: scale(1.04);
}

.popup-clicked {
    font-size: 16px !important;
    border-radius: 12px !important;
    font-family: 'Fredoka', Arial, Helvetica, sans-serif !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    background: linear-gradient(145deg, #265dff, #002eb5) !important;
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.3),
        inset 0 0 6px rgba(255, 255, 255, 0.5) !important;
    transition: transform 0.2s ease, background 0.3s ease, box-shadow 0.2s ease !important;
}

.second-popup__container-buttons-normal:hover,
.second-popup__container-buttons-permanent:hover {
    transform: translateY(-2px) scale(1.05);
    color: white;
    background: linear-gradient(145deg, #ffae00, #ff7b00);
    box-shadow:
        0 8px 14px rgba(0,0,0,0.25),
        inset 0 0 7px rgba(255,255,255,0.5);
}
.second-popup__container-add:hover {
    transform: translateY(-2px) scale(1.05);
}

@media (max-width: 650px) {

    .calculator-popup__buttons button {
        font-size: clamp(10px, 3vw, 14px); /* responsive font */
        padding: 8px 12px; /* reduce padding */
    }
}

/* MOBILE RESPONSIVE */

@media (max-width: 650px) {
    .calculator-popup__second-container {
        width: 90%;
        padding: 20px 15px;
    }

    .second-popup__container-buttons {
        gap: 10px;
    }

    .second-popup__container-add,
    .second-popup__container-quantity-input {
        width: 80%;
    }
}




