:root {
  /* Colors */
  --negro: #000000;
  --blanco: #FFFFFF;
  --azul-brillante-suave: #0A84FF;
  --gris-neutro: #8E8E93;
  --gris-claro: #F2F2F7;
  --gris-oscuro: #3A3A3C;
}

h1{
    text-align: center;
    margin-bottom: 20px;
}

.search-wrapper{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

.search-wrapper .search-toggle{
    padding: 4px;
    border: none;
    background: transparent;
    color: #0d6efd;
}

.search-box{
    display: none;
    position: relative;
}

.search-box.active{
    display: block;
}

.search-box input{
    width: 220px;
    max-width: 100%;
}

.search-suggestions{
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 1000;
    width: 220px;
    max-height: 192px;
    overflow-y: auto;
    display: none;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.search-box.active .search-suggestions{
    display: block;
}

.table{
    max-width: 600px;
    margin: 0 auto;
}

#createBudgetContainer{
    max-width: 600px;
    margin: 0 auto;
}

label {
    display: block;
    color: var(--negro)!important;
    font-weight: 500;
    margin-bottom: 5px;
}

.form-group {
    margin-bottom: 15px;
}
.form-control{
    padding: 5px 10px;
}

.client-search-wrapper{
    position: relative;
}

.client-search-wrapper .search-suggestions{
    width: 100%;
    max-width: none;
    top: calc(100% + 5px);
}

.modal-footer{
    padding-bottom: 0px!important;
    padding-top: 0px!important;
    border-top: none!important;
}

.alert{
    width: fit-content;
    margin: 0 auto;
}
.price-input{
    max-width: 120px;
}

.footer {
    width: 100%;
    height: 200px;
}

.form-check{
    padding: 0px!important;
}

.product-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #0A84FF;
    color: #FFFFFF;
    padding: 15px 20px;
    text-align: center;
    font-weight: 500;
    font-size: 16px;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 576px){
    .table{
        width: 100%;
        max-width: 100%;
    }

    .table thead{
        display: none;
    }

    .table tbody{
        display: flex;
        flex-direction: column-reverse;
        gap: 12px;
    }

    .table tbody tr{
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 14px 16px;
        border: 1px solid #dee2e6;
        border-radius: 12px;
        background-color: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        position: relative;
    }

    .table tbody tr td{
        border: none;
        padding: 0;
    }

    .table tbody tr td:first-child{
        grid-column: 1 / -1;
    }

    .table tbody tr td:first-child::before{
        content: "Producto";
        display: block;
        font-size: 12px;
        color: #6c757d;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .table tbody tr td:nth-child(2){
        display: flex;
        flex-direction: column;
        order: 2;
    }

    .table tbody tr td:nth-child(2)::before{
        content: "Descripción";
        font-size: 12px;
        color: #6c757d;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .table tbody tr td:nth-child(5){
        display: flex;
        flex-direction: column;
        order: 3;
    }

    .table tbody tr td:nth-child(5)::before{
        content: "Foto";
        font-size: 12px;
        color: #6c757d;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .table tbody tr td:nth-child(3){
        display: flex;
        flex-direction: column;
        order: 4;
    }

    .table tbody tr td:nth-child(3)::before{
        content: "Precio";
        font-size: 12px;
        color: #6c757d;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .table tbody tr td:nth-child(4){
        display: flex;
        flex-direction: column;
        order: 5;
    }

    .table tbody tr td:nth-child(4)::before{
        content: "Cantidad";
        font-size: 12px;
        color: #6c757d;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .table tbody tr td:nth-child(6){
        position: absolute;
        top: 2px;
        right: 16px;
        display: flex;
        justify-content: flex-end;
        align-items: flex-start;
        order: 6;
    }

    .table tbody tr .form-control{
        width: 100%;
    }

    .table tbody tr .price-input{
        max-width: none;
    }

    .table tbody tr .delete-product{
        font-size: 24px;
    }

    .table tbody tr td:nth-child(2) .description-btn,
    .table tbody tr td:nth-child(5) .photo-btn{
        width: 100%;
        margin-top: 4px;
    }
}

@media (max-width: 768px){
    .search-wrapper{
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper .search-toggle{
        align-self: center;
    }

    .search-box{
        width: 100%;
        text-align: left;
    }

    .search-box input{
        width: 100%;
    }

    .search-suggestions{
        width: 100%;
    }
}