﻿

body {
    font-family: Segoe UI;
    background: #f5f7fb;
    margin: 0;
}


.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 10px; /* 🔽 mic padding lateral */
}


    .container:empty {
        display: none;
    }


.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 16px;
}

.card {
    background: white;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* INPUT */
.inputField {
    margin-bottom: 10px;
}

.btn {
    width: 100%;
    padding: 14px;
    background: #0078D4;
    color: white;
    border: none;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 16px;
    margin-top: 5px;
}

.fieldError {
    color: #d32f2f;
    font-size: 12px;
    min-height: 14px;
}


.messageBox {
    display: block;
    margin: 30px auto;
    padding: 15px 20px;
    width: fit-content;
    max-width: 600px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-family: Segoe UI, Arial, sans-serif;
}

/* Success */
.messageSuccess {
    background-color: #e6f9ec;
    color: #1e7e34;
    border-color: #b7ebc6;
}

/* Error */
.messageError {
    background-color: #fdecea;
    color: #b71c1c;
    border-color: #f5c6cb;
}

/* Warning */
.messageWarning {
    background-color: #fff4e5;
    color: #8a5700;
    border-color: #ffd59e;
}








.messageError::before,
.messageError::after {
    display: none !important;
}



    .messageError ul {
        margin: 0;
        padding-left: 18px;
    }

    .messageError li {
        line-height: 1.4;
        margin-bottom: 6px;
    }


.errorWrapper {
    margin: 10px 0;
    padding: 0;
    background: transparent;
}




#loadingDiv {
    display: none;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}


/* MESAJ */
.infoBox {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px;
    color: #842029;
    line-height: 1.5;
    font-size: 15px;
}

/* HEADER CLIENT */
.clientSummary {
    background: #eef4ff;
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 5px solid #2f74c0;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    font-weight: 500;
    color: #1f3b73;
}

    .clientSummary b {
        font-weight: 600;
    }

    .clientSummary::before {
        content: "📄";
        margin-right: 6px;
    }

    .clientSummary::after {
        content: "";
        display: block;
        height: 2px; /* 🔥 mai gros */
        background: linear-gradient(to right, #2f74c0, transparent);
        margin-top: 8px;
    }


/* OFERTA */

.ofertaContainer {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap; /* ✅ păstrăm */
    width: 100%; /* 🔥 fix important */
}



.wideContainer {
    max-width: 750px; /* 🔥 mai lat decât form */
    margin: auto;
    padding: 15px;
}


@media (max-width: 600px) {
    .wideContainer {
        max-width: 100%;
        padding: 10px;
    }

    .container {
        max-width: 100%;
        margin: 0 auto;
        padding: 10px;
    }

}


@media (max-width: 900px) and (min-width: 601px) {
    .container {
        max-width: 600px;
        margin: 0 auto;
        padding: 12px;
    }
}




    /*pentru a adăuga o animație de fade-in la mesajele de eroare și succes:
*/
    .fade-in {
        animation: fadeIn 0.5s ease-in-out;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }


    .modernInfo {
        padding: 16px;
        border-radius: 10px;
        background: #f0f7ff;
        border: 1px solid #cce4ff;
        color: #0b5394;
    }

    .infoHeader {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 600;
        margin-bottom: 10px;
        font-size: 15px;
    }

    .infoIcon {
        font-size: 18px;
    }

    .infoContent {
        line-height: 1.6;
        font-size: 14px;
    }

    /*
    ---CSS pentru materiale si cos "cumparaturi"
    body {
    background: #f4f6f9;
}

/* LAYOUT */
    /* =========================================
   LAYOUT MATERIALE + COS
========================================= */


/*    .ofertaContainer {
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }*/


    /* LEFT aici ajustam cat de mare sau mica sa fie cele 2 grid-uri */
    .ofertaLeft {
        flex: 1.6;
        min-width: 0; /* 🔴 IMPORTANT pentru overflow fix */
    }

    /* RIGHT */
    .ofertaRight {
        flex: 1.4;
        min-width: 340px;
        position: sticky;
        top: 10px;
    }

    /* =========================================
   PANEL
========================================= */

    .materialPanel {
        background: #ffffff;
        border: 1px solid #dfe3e8;
        border-radius: 10px;
        overflow: visible;
        margin-bottom: 6px;
    }

    .materialHeader {
        background: #f5f7fa;
        border-bottom: 1px solid #dfe3e8;
        padding: 14px 18px;
        font-size: 18px;
        font-weight: 600;
        color: #2f3b52;
    }

    /* =========================================
   GRID
========================================= */

    .materialGrid {
        width: 100%;
        border-collapse: collapse;
        font-size: 15px;
    }

        .materialGrid th {
            background: #fafbfd;
            padding: 12px 10px;
            text-align: left;
            border-bottom: 1px solid #e8edf3;
            color: #445166;
            font-weight: 600;
            font-size: 15px;
        }

        .materialGrid td {
            padding: 12px 10px;
            border-bottom: 1px solid #eef2f6;
            color: #2f3542;
            font-size: 15px;
            white-space: nowrap;
        }

        .materialGrid tr:hover {
            background: #f8fbff;
        }

        .materialGrid input,
        .materialGrid button {
            vertical-align: middle;
        }


    /* =========================================
   INPUT PRET
========================================= */

    .priceInput {
        width: 70px;
        padding: 8px 10px;
        border: 1px solid #ccd3db;
        border-radius: 6px;
        text-align: right;
        font-size: 15px;
    }

        .priceInput:focus {
            border-color: #2f74c0;
            outline: none;
        }

    /* =========================================
   BUTTONS
========================================= */

    .btnAdd {
        background: #2f74c0;
        color: white;
        border: none;
        padding: 7px 10px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
        min-width: 64px;
        margin-left: 6px;
    }

        .btnAdd:hover {
            background: #245d99;
        }

    .btnRemove {
        background: #d9534f;
        color: white;
        border: none;
        width: 28px;
        height: 28px;
        border-radius: 6px;
        cursor: pointer;
        font-weight: bold;
    }

        .btnRemove:hover {
            background: #b52b27;
        }



    .ofertaWrapper {
        max-width: 1200px;
        margin: auto;
        padding: 10px 15px; /* 🔴 redus de la 15-20 */
    }

    @media (min-width: 1200px) {
        .ofertaWrapper {
            max-width: 1200px;
        }
    }

    .clientSummary {
        max-width: 100%;
    }


    /* =========================================
   COS
========================================= */

    .cartSummary {
        padding: 14px 18px;
        background: #fafbfd;
        border-top: 1px solid #e8edf3;
    }

    .summaryRow {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
        font-size: 14px;
    }

        .summaryRow:last-child {
            margin-bottom: 0;
            padding-top: 10px;
            border-top: 1px solid #dfe3e8;
            font-size: 18px;
            font-weight: 700;
        }

    .summaryBig {
        margin-bottom: 0;
        padding-top: 10px;
        border-top: 1px solid #dfe3e8;
        font-size: 18px;
        font-weight: 700;
    }

    .emptyCart {
        padding: 25px;
        text-align: center;
        color: #7b8794;
    }


    .cartGrid {
        width: 100%;
    }

    .ofertaRight .materialPanel {
        width: 100%;
    }

    .ofertaRight .summaryRow {
        width: 100%;
        box-sizing: border-box;
    }

    .ofertaRight .materialGrid td:last-child,
    .ofertaRight .materialGrid th:last-child {
        width: 55px;
        text-align: center;
    }

    .ofertaRight .materialGrid td,
    .ofertaRight .materialGrid th {
        font-size: 15px;
    }

        .ofertaRight .materialGrid td:nth-child(2),
        .ofertaRight .materialGrid td:nth-child(3) {
            text-align: center;
        }

        .ofertaRight .materialGrid td:nth-child(4) {
            text-align: right;
            font-weight: 600;
        }



    @media screen and (max-width: 900px) {

        .ofertaContainer {
            flex-direction: column;
        }

        .ofertaRight {
            width: 100%;
            min-width: auto;
        }

        .ofertaLeft {
            width: 100%;
        }
    }


    /* =========================================
   INFO BOX MODERN
========================================= */


    .actionWrapper {
        width: 100%;
        margin-top: 10px;
        display: flex;
        justify-content: center; /* ✅ centru */
    }



    /*.infoWrapper {
        width: 100%;*/ /* 🔴 obligatoriu */
        /*margin-top: 12px;
        clear: both;*/ /* 🔴 FIX IMPORTANT */
        /*margin-top: 6px;
    }*/

    .infoWrapper {
        width: 100%;
        margin-top: 6px;
        display: block;
    }



    .infoWrapper,
    .actionWrapperModern,
    .actionWrapper {
        width: 100%;
        display: block;
    }


        .infoBoxModern {
            display: flex;
            gap: 12px;
            align-items: flex-start;
            background: #eef5ff;
            border: 1px solid #cfe2ff;
            border-left: 4px solid #2f74c0;
            padding: 16px;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            padding: 10px 14px; /* 🔽 */
        }
        /* ICON */
        .infoIcon {
            font-size: 22px;
            line-height: 1;
            margin-top: 2px;
        }
        /* CONTENT */
        .infoContent {
            font-size: 14px;
            line-height: 1.6;
            color: #2f3b52;
            flex: 1;
        }
            /* LINKURI */
            .infoContent a {
                color: #2f74c0;
                text-decoration: underline;
            }

                .infoContent a:hover {
                    color: #1e5aa5;
                }
            /* LISTE */
            .infoContent ul {
                margin: 6px 0;
                padding-left: 18px;
            }


        .infoBoxModern:hover {
            box-shadow: 0 6px 18px rgba(0,0,0,0.08);
            transition: 0.2s;
        }
        /* MOBILE */
        @media (max-width: 600px) {
            .infoBoxModern {
                flex-direction: row;
                padding: 14px;
            }

            .infoContent {
                font-size: 13px;
            }
        }
        /*Date client selectat*/
        .clientSummaryInline {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: end;
            padding: 10px;
            border: 1px solid #dcdcdc;
            background: #f8f9fb;
            border-radius: 6px;
            margin-top: 10px;
        }

        .fieldInline {
            display: flex;
            flex-direction: column;
        }

            .fieldInline span {
                font-size: 11px;
                font-weight: 600;
                color: #6b7280;
                margin-bottom: 3px;
            }

        .summaryInput {
            height: 28px;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            padding: 4px 8px;
            font-size: 13px;
            background: white;
            width: 140px;
        }

        .fieldClient .summaryInput {
            width: 300px;
        }

        .smallField .summaryInput {
            width: 80px;
        }
        /* =========================================
   ACTION BOX MODERN, chiria in avans
========================================= */

        .actionWrapperModern {
            margin-top: 4px;
        }

        .actionBoxModern {
            display: flex;
            gap: 14px;
            align-items: flex-start;
            background: #fff8e6;
            border: 1px solid #ffe0a3;
            border-left: 5px solid #f59e0b;
            padding: 16px;
            border-radius: 10px;
            padding: 10px 14px; /* 🔽 */
        }
        /* ICON */
        .actionIcon {
            font-size: 22px;
            margin-top: 2px;
        }
        /* TEXT */
        .actionQuestion {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 12px;
            color: #92400e;
        }
        /* CHOICES */
        .actionChoices {
            display: flex;
            gap: 15px;
        }
        /* BOX STYLE */
.choiceBox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    background: white;
    transition: 0.2s;
    white-space: nowrap;
}

            .choiceBox:hover {
                background: #fff3cd;
                border-color: #f59e0b;
            }


    .choiceBox input[type="radio"] {
        transform: scale(1.3);
        margin-right: 6px;
        pointer-events: none;
        margin: 0;
    }


                .choiceBox input[type="radio"]:checked + span {
                    font-weight: 600;
                    color: #2f74c0;
                }


    .choiceBox label {
        white-space: nowrap;
    }

            .choiceBox span {
                white-space: nowrap; /* 🔥 cheia */
            }


.actionSubText {
    margin-top: 4px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

    /* link */
    .actionSubText a {
        color: #2f74c0;
        text-decoration: underline;
    }

        .actionSubText a:hover {
            color: #1e5aa5;
        }


        /* ERROR */
        .actionError {
            color: #d32f2f;
            margin-top: 8px;
            font-size: 13px;
        }
        /* MOBILE */
        @media (max-width: 600px) {

            .actionChoices {
                flex-direction: column;
            }

            .materialGrid td {
                white-space: normal;
                padding: 10px 6px;
            }

                .materialGrid td:last-child,
                .materialGrid th:last-child {
                    text-align: right;
                    width: 1%;
                    white-space: nowrap;
                }

            .btnAdd {
                min-width: auto;
                padding: 6px 8px;
                font-size: 11px;
            }

            .materialPanel {
                overflow: hidden;
            }
        }
