/* Aquest fitxer CSS defineix els estils per a la webapp el fitxer index.html i alguns per el fixter registre.html */

* {
    box-sizing: border-box;
}

html, body {
    /* Evita l'efecte rebot elástic en els extrems de la pàgina */
    overflow-x: hidden;
    width: 100%;
}

#salutacio-nom {
text-overflow: ellipsis;
font-size: 20px;
font-weight: bold; 
color: rgb(0, 0, 0); 
text-align: center;
margin: 0;
line-height: 1.2;
display: flex;
align-items: center;
}

.btn-guardar {
    background-color: #649f67;
    transition:all 0.5s ease;
    color: white; 
    padding: 12px; 
    border: none; 
    border-radius: 8px; 
    font-weight: bold; 
    cursor: pointer; 
    margin-top: 10px;
}

.btn-guardar:hover {
    transform: translateY(-5px);
    background-color:#78c864;
}

.btn-logout {
    background-color: #c62828; 
    transition: all 0.5s ease;
    color: white; 
    padding: 12px 20px; 
    border: none; 
    border-radius: 10px; 
    font-weight: bold; 
    cursor: pointer; 
    width: 100%; 
    max-width: 400px;
    display: block;
    margin: 40px auto 0;
    width: 600px; 
    max-width: 100%;
}

@media (max-width: 900px) {
    .btn-logout {
        width: 250px; 
        max-width: 100%;
        margin: 5px auto 0;
    }
}

.btn-logout:hover {
    transform: translateY(-5px);
    background-color: #e45f5d;
}

.btn-validar {
    background-color: #e87a1a;
    padding: 20px;
    border-radius: 20px;
    color: #000000;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.5s ease;
    transition: color 0.20s ease;
}

.btn-validar:hover {
    transform: scale(1.05);
    background-color: #f19722;
    color: #000000;
}

.btn-validar:active { 
    background-color: #ffffff;
    color: #ffffff;
}

.canvi-dades {
margin: 10px 0 14px;
padding: 10px;
border-radius: 5px;
border: none;
background-color: #cbddef;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.886);
font-size: 14px;
width: 100%;
max-width: 100%;
}

@media (max-width: 900px) {
    .canvi-dades {
    margin: 15px 0px;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background-color: #dbdcfae3;
    box-shadow: 0 2px 6px rgba(12, 12, 12, 0.996);
    font-size: 14px;
    width: 100%;
    max-width: 100%;
    }
}

.formulari-perfil {
    padding: 20px;
    border-radius: 20px;
    background-color: #ffffff;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.div-formulari {
    background-color: #b2c7b5;
    border-radius: 30px;
    max-width: 680px;
    width: min(100%, 680px);
    margin: 0px auto;
    box-shadow: 0 4px 8px rgba(18, 17, 17, 0.912);
}

@media (max-width: 900px) {
    .div-formulari {
        width: calc(100% - 20px);
        padding: 20px;
        border-radius: 20px;
        margin: 0 auto 20px;
    }

    .formulari-perfil {
        padding: 10px;
        margin: 20px 0;
        align-items: stretch;
    }

    .titol-editarperfil {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
}

@media (min-width: 901px) {
    .div-formulari {
        padding: 32px;
    }

    .formulari-perfil {
        margin: 0 auto;
        max-width: 720px;
        padding: 40px 32px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        text-align: start;
        align-items: stretch;
    }
}

#btn-perfil {
border-radius: 30%;
padding: 8px;
background-color:#c62828;
transition: all 0.5s ease;
border: none;
cursor: pointer;
font-size: 20px;
color: rgb(255, 255, 255);
transition: all 0.5s ease;
transition: color 0.20s ease;
}

#btn-perfil:hover {
background-color:rgb(0, 0, 0);
transform: scale(1.05);
}

#btn-perfil:active { 
transform: scale(1.25);
background-color: #000000;
color: #ffffff;
}

.comerc-desc {
white-space: pre-wrap;
}

.btn-comarribar {
    display: block;
    background: #4285F4;
    transition: background-color 0.3s ease, transform 0.1s ease;
    color: white !important;
    text-align: center;
    padding: 6px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 6px;
}

.btn-comarribar:hover {
    transform: scale(0.98);
    background-color:rgb(148, 163, 226);
}

.btn-pujarfactura {
display: block; 
background: #27ae60; 
transition: background-color 0.3s ease, transform 0.1s ease;
color: white; 
text-align: center; 
padding: 6px; 
border-radius: 4px; 
font-size: 12px; 
cursor: pointer; 
font-weight: bold;
}

.btn-pujarfactura:hover {
    transform: scale(0.98);
    background-color:#8ac3a2;
}

/* Contingut del validador i missatges */
#status-pujada {
font-size: 12px;
color: #db3e3e;
margin-top: 10px;
display: none;
}

.marcador-personalitzat-net {
    background-color: transparent;
    border: none;
}

.user-location-popup-wrapper .leaflet-popup-content-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.user-location-popup-wrapper .leaflet-popup-content {
    margin: 0 !important;
    min-width: auto;
    max-width: none;
    line-height: 1.2;
    padding: 0 !important;
    background: transparent !important;
}

.user-location-popup {
    display: inline-block;
    padding: 0;
    margin: 0;
    font-family: sans-serif;
    font-size: 12px;
    line-height: 1.2;
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    background: transparent;
}

.popup-desc {
    margin: 4px 0;
    font-size: 12px;
    color: #555;
    white-space: pre-wrap;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup-desc.expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.popup-desc-toggle {
    border: none;
    background: transparent;
    padding: 0;
    margin: 2px 0 0;
    color: #4b539c;
    font-weight: bold;
    font-size: 11px;
    cursor: pointer;
}

@media (max-width: 480px) {
    .leaflet-popup-content {
        min-width: 140px;
        max-width: min(68vw, 170px);
    }

    .leaflet-popup-content img {
        height: 60px;
    }

    .popup-desc {
        font-size: 10px;
        -webkit-line-clamp: 2;
    }

    .leaflet-popup-content strong {
        font-size: 11.5px !important;
    }

    .leaflet-popup-content .btn-comarribar,
    .leaflet-popup-content .btn-pujarfactura {
        font-size: 9.5px !important;
        padding: 3px !important;
    }
}

.card-mapa {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 8px;
    border-radius: 30px;
}

@media (max-width: 900px) {
    .card-mapa {
        padding: 0;
        width: 100%;
        background-color: transparent;
        border-radius: 0;
    }
}

#seccio-mapa {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
}

#mapa-interactiu {
    width: 100%;
    height: 700px;
    max-width: 100%;
    background-color: #dfa3a3;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: bold;
    border: 1px dashed #9999;
}

@media (max-width: 900px) {
    #mapa-interactiu {
        height: 520px;
        width: 100%;
    }
}

.btn-gps-flotant {
position: absolute;
bottom: 20px;       /* Distància des del límit inferior del mapa */
right: 20px;        /* Distància des del límit dret del mapa */
z-index: 4000;      /* Obligatori: el posa per sobre de les capes de Leaflet */
width: 45px;
height: 45px;
border-radius: 50%;
background-color: #4b539c; 
transition: all 0.5s ease;
color: white;
border: none;
cursor: pointer;
box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
}

.btn-gps-flotant:hover {
        transform: scale(1.05);
        background-color:#050c21;
    }

.btn-gps-flotant:active {
background-color: #f4f4f4;
transform: scale(0.95);
}

.llista-premis {
display: flex;
flex-direction: column;
gap: 10px;
margin-top: 15px;
}

.premi-item {
background:rgb(253, 246, 246);
padding: 10px;
border-radius: 8px;
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid rgba(0,0,0,0.1);
}

.fons-app {
display: flex;
flex-direction: column;
background-color:rgb(253, 246, 246);
}

.seccio-app {
width: 100%;
}

.header-app {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 30px;
background-color: rgb(134, 137, 207);
color: rgb(0, 0, 0);
margin-bottom: 20px;
}

@media (max-width: 400px) {
    .header-app {
    flex-direction: column;
    padding: 20px;
    }
}

@media (min-width: 901px) {
    .header-app {
        margin-bottom: 40px;
    }
}

.perfil-container {
display: flex;
align-items: center;
gap: 15px;
min-width: 100px;
padding-left: 10px;
padding-right: 10px;
}

.titol-editarperfil {
    margin-bottom: 20px; 
    text-align: center;
}

.main-container {
padding: 50px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-bottom: 20px;
}

@media (max-width: 900px) {
    .main-container {
    padding: 20px;
    }
}

.logo {
padding: 1px;
color:rgba(0, 0, 0, 0.701);
font-family: sans-serif; 
font-weight: bold;
font-size: 1.5rem;
}

.logo-index {
width: 250px;
height: 80px;
}

@media (max-width: 900px) {
    .logo-index {
    width: 50%;
    height: 50%;
    gap: 20px;
    display: block;
    margin: 0 auto;
    transform: translateX(10px);
    }
}

.font {
font-family: "Chango", sans-serif;
font-style: normal;
font-weight: 800;
font-style: normal;
font-size: 2.5rem;
color: #ffffff;
}

.logo-registre {
margin: 0 auto;
padding: 1px;
margin-top: 40px;
}

/* responsive per a telèfon mòbil */
@media (max-width: 900px) {
    .logo-registre {
    width: 100%;
    height: 100%;
    gap: 20px;
    padding: 20px;
    }
}

body { 
font-family: sans-serif; 
background: var(--bg); 
margin: 0; 
padding-bottom: 20px; 
}

header { 
background: rgb(251, 251, 251); 
padding: 15px; 
display: flex; 
justify-content: space-between; 
border-bottom: 2px solid var(--primary); 
}

@media (max-width: 900px) {
    #seccio-moneder {
    width: 100%;          
    max-width: 320px;      
    margin: 8px auto;    
    padding: 15px;         
    border-radius: 24px;   
    }
}

#seccio-moneder {
background-color: #b4cfc0;
border-radius: 50px; 
padding: 45px;
box-shadow: 0 8px 32px rgb(158, 102, 96);
}

@media (max-width: 600px) {
    #seccio-moneder {          
    padding: 20px; 
    border-radius: 50px;               
    box-sizing: border-box;
    }
}

.card { 
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
padding: 50px;
box-shadow: 0 8px 32px rgb(122, 86, 86);
margin: 100px;  
border-radius: 100px;  
text-align: center; 
font-size: 2.0rem;
color: #000000;
margin-bottom: 40px; 
}

@media (max-width: 900px) {
    .card {
    width: 100%;          
    max-width: 380px;      
    margin: 20px auto;    
    padding: 20px;         
    box-sizing: border-box;
    border-radius: 50px;
    }
}

.card-index {
padding: 50px;
box-shadow: 0 8px 32px rgb(0, 0, 0);
margin: 20px 0;  
border-radius: 20px; 
border-color:rgb(230, 39, 39);
text-align: center; 
font-size: 20px;
color: #000000;
background-color:#b1ceb6;
margin-bottom: 5px;
}

@media (max-width: 900px) {
    .card-index {
    width: 100%;          
    font-size: 20px;
    margin: 10px auto;
    padding: 20px;
    }
}

#saldo { 
font-size: 3rem; 
color: #1a8a27; 
font-weight: bold; 
}

@media (max-width: 900px) {
    #saldo {
        font-size: 30px;
    }
}

.btn-main { 
font-weight: bold;
margin-bottom: 20px; 
margin-top: 20px;
background: var(--primary);
border: none; 
padding: 15px 30px; 
border-radius: 50px; 
font-size: 1.1rem; 
width: 50%;
cursor: pointer;
transition: all 0.5s ease;
transition: color 0.20 ease;
background-color: #e87a1a;
white-space: nowrap;
}

.btn-main:hover {  /* Canvia el color del botó al pasar el mouse a sobre */
color: #ffffff;
transform: translateY(-5px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.701);
}

.btn-main:active {
transform: translateY(-20px); /* Canvia el color del botó al ser clicat */
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.701);
}

.top-nav { 
width: 100%; 
max-width: 600px;
background: #7e8cc4; 
gap: 20px;
display: flex;
justify-content: center;
flex-wrap: wrap;
margin: 0 auto;
}

@media (max-width: 900px) {
    .top-nav {
    gap: 5px;
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
    justify-content: start; 
    }
}

@media (max-width: 900px) {
    .top-nav button {
        margin: 5px;
    }
}

.top-nav button {
flex: 1 1 auto;
min-width: 90px;
padding: 15px; 
border-radius: 20px; 
border: none;
cursor: pointer;
background-color:#c62828;
color: #ffffff;
font-weight: bold; 
font-size: 1.1rem;
transition: all 0.5s ease;
transition: color 0.20 ease;
}

.top-nav button:hover {
color: #000000;
transform: translateY(-5px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.701);
}

.footer-registre {
font-weight: bold;
text-align: center;
margin-top: 30px;
color: #000000;
backdrop-filter: blur(2px);
background-color:rgba(63, 41, 124, 0.312);
margin: 35px;
-webkit-backdrop-filter: blur(20px);
border-radius: 50px;
padding: 15px;
box-shadow: 0 8px 32px rgba(161, 106, 106, 0.793);
}

@media (max-width: 900px) {
    .footer-registre {
    backdrop-filter: blur(2px);
    background-color: rgba(63, 41, 124, 0.275);
    width: calc(100% - 10px);
    margin: 30px auto;
    font-size: 10px;
    text-align: center;
    align-content: center;
    border-radius: 50px;
    padding: 5px;
    color: white;
    }
}

.enllaç-anar-registre {
color: #040f16; 
transition: all 0.5s ease;
text-decoration: none; 
font-weight: bold; 
text-decoration: underline;
}

.enllaç-anar-registre:hover {
    transform: scale(1.05);
    background-color:#1bb323;
}


.footer-index {
background-color:rgb(134, 137, 207);
font-weight: bold;
text-align: center;
color: #000000;
border-color:rgb(230, 39, 39);
border-radius: 50px;
padding: 10px;
margin-bottom: 5px;
margin: 5px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.793);
width: calc(100% - 5px);
box-sizing: border-box;
}

@media (max-width: 900px) {
    .footer-index {
    width: calc(100% - 10px);
    margin: 5px auto;
    font-size: 12px;
    text-align: center;
    align-content: center;
    border-radius: 50px;
    padding: 5px;
    }
}

#seccio-premis {
    padding: 20px;
    background-color: transparent;
    width: 100%;
}

.llista-premis-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
padding: 16px;
background-color: #9195db;
border-radius: 12px;
width: 100%;
height: auto;
min-height: 120px;
}

.premi-item {
background-color: #fdf6f6;
border-radius: 20px;
padding: 15px 25px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 20px;
border: 3px solid #9195db;
width: 100%;
min-width: 0;
}

.premi-imatge-wrapper {
width: 100px;
height: 100px;
min-width: 100px;
border-radius: 10px;
background-color: #fabb31;
background-size: 100%;
background-position: center;
background-repeat: no-repeat;
flex-shrink: 0;
}

.premi-item > strong {
flex: 1 1 0;
min-width: 0;
margin-left: 6px;
color: #2c3e50;
font-size: 1.05rem;
font-weight: 700;
line-height: 1.3;
text-align: center;
overflow-wrap: break-word;
}

.premi-card {
    padding: 5px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex: 0 0 auto;      
}

@media (max-width: 900px) {
    #seccio-premis {
        padding: 20px 10px;
    }

    .llista-premis-grid {
        grid-template-columns: 1fr;
        width: 100%;
        min-height: 120px;
        padding: 10px;
    }

    .premi-item {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 15px;
    }

    .premi-imatge-wrapper,
    .imatge-formatge,
    .imatge-vins {
        width: 80px;
        height: 80px;
        min-width: 70px;
        margin: 0;
        padding: 0;
        border: 1px solid rgb(255, 252, 252);
    }

    .premi-item > strong {
        display: block;
        width: 100%;
        min-width: 0;
        margin-left: 0;
        font-size: 1rem;
        line-height: 1.35;
        text-align: center;
    }

    .premi-card {
        width: 100%;
        padding: 0;
    }

    .preu-rals {
        width: 100%;
        padding: 10px;
        font-size: 0.9rem;
        white-space: normal;
    }
}

.card-premi h3 {
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.3;
}

@media (max-width: 900px) {
    .card-premi h3 {
        font-size: 1rem !important;
        line-height: 1.25;
    }
}

.imatge-formatge {
width: 42%;
max-width: 180px;
height: 180px;
aspect-ratio: 1 / 1;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-color: #fff;
border-radius: 40px;
border: 1px solid rgb(255, 252, 252);
}

@media (max-width: 900px) {
    .imatge-formatge {
    width: 150px;
    height: 150px;
    max-width: 50%;
    margin: 20px auto;
    padding: 80px;
    }
}

.imatge-vins {
width: 42%;
max-width: 180px;
height: 180px;
aspect-ratio: 1 / 1;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-color: #fff;
border-radius: 40px;
border: 1px solid rgb(255, 252, 252);
}

@media (max-width: 900px) {
    .imatge-vins {
    width: 150px;
    height: 150px;
    max-width: 50%;
    margin: 20px auto;
    padding: 80px;
    }
}

.imatge-scaperoom {
width: 42%;
max-width: 180px;
height: 180px;
aspect-ratio: 1 / 1;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-color: #fff;
border-radius: 40px;
border: 1px solid rgb(255, 252, 252);
}

@media (max-width: 900px) {
    .imatge-scaperoom {
    width: 150px;
    height: 150px;
    max-width: 50%;
    margin: 20px auto;
    padding: 80px;
    }
}

.premi-info {
text-align: center;
flex-grow: 1;
}

.premi-info strong {
font-size: 1.2rem;
color: #000000;
font-weight: bold;
}

.preu-rals {
background-color: #79b35d;
color: #ffffff;
border: none;
border-radius: 10px;
padding: 12px 20px;
font-weight: bold;
font-size: 1.05rem;
cursor: pointer;
white-space: nowrap;
}

.preu-rals:hover {  
background-color: #5d9343;
transform: translateY(-2px);
}

.preu-rals:active {
transform: scale(0.98);
box-shadow: 0 4px 10px rgba(70, 204, 73, 0.701);
}

.modal-premis-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(142, 143, 211, 0.7);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}

.modal-premis-contingut {
background-color: rgb(255, 255, 255);
border-radius: 20px;
padding: 60px;
max-width: 400px;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
position: relative;
animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
    transform: translateY(50px);
    opacity: 0;
    }
    to {
    transform: translateY(0);
    opacity: 1;
    }
}

.modal-tancar {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-tancar:hover {
    color: #333;
}

.modal-premi-imatge {
    width: 100%;
    height: 220px;
    background-color: #ecb834;
    border-radius: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
}

.modal-premi-imatge img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 900px) {
    .modal-premi-imatge {
        height: 190px;
    }
}

.modal-premi-cos {
    text-align: center;
}

.modal-premi-cos h3 {
    font-size: 22px;
    color: #333;
    margin: 0 0 10px 0;
}

.modal-premi-cos p { 
    font-size: 14px;
    color: #6b5d5d;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.modal-preu-info {
    background-color: #faf7f7;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.modal-preu-info span {
    font-size: 16px;
    color: #27ae60;
    font-weight: bold;
}

.modal-preu-info strong {
    font-size: 18px;
    color: #27ae60;
}

.btn-confirmar-compra {
    background-color: #27ae60;
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn-confirmar-compra:hover {
    background-color: #99c2aa;
    transform: scale(1.02);
}

.btn-confirmar-compra:active {
    transform: scale(0.98);
}

.btn-noucomerc {
    background: #4b539c;
    transition: background-color 0.3s ease, transform 0.1s ease;
    color: white; 
    border: none; 
    padding:6px 12px; 
    border-radius: 4px; 
    font-size: 12px; 
    cursor: pointer; 
    font-weight: bold;
}

.btn-noucomerc:hover {
    transform: scale(0.98);
    background-color:rgb(100, 136, 195);
}

@media (max-width: 900px) {
    .btn-noucomerc {
        padding: 5px 8px;
        font-size: 10px;
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    .btn-noucomerc {
        min-width: 112px;
        padding: 7px 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    h3[onclick*="toggleSeccioAdmin"],
    .capcalera-premis-admin {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        width: 100% !important;
    }

    h3[onclick*="toggleSeccioAdmin"] > span,
    .capcalera-premis-admin > span {
        flex: 1 1 auto;
        min-width: 0;
        display: block;
        line-height: 1.2;
        font-size: 14px !important;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    h3[onclick*="toggleSeccioAdmin"] > div,
    .capcalera-premis-admin > div {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        flex: 0 0 auto;
        min-width: 0;
        gap: 12px;
    }

    #icona-desplegar-comercos,
    #icona-desplegar-premis {
        margin-left: 0 !important;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

.btn-guardarubi {
background: #27ae60; 
transition: background-color 0.3s ease, transform 0.1s ease;
color: white; 
border: none; 
padding: 8px 15px; 
border-radius: 4px; 
font-weight: bold; 
cursor: pointer; 
flex: 1;
}

.btn-guardarubi:hover {
    transform: scale(0.98);
    background-color:rgb(138, 206, 158);
}

@media (max-width: 900px) {
    .btn-guardarubi {
    padding: 5px;
    font-size: 12px;
    }
}

.btn-cancelarubi {
background: #95a5a6;
transition: background-color 0.3s ease, transform 0.1s ease;
color: white; 
border: none; 
padding: 8px 15px; 
border-radius: 4px; 
font-weight: bold; 
cursor: pointer;
}

.btn-cancelarubi:hover {
    transform: scale(0.98);
    background-color:rgb(88, 90, 89);
}

#llista-comercos-admin {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.item-premi-admin {
    min-width: 0;
}

.item-premi-admin > div:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.item-premi-admin > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .capcalera-premis-admin {
        gap: 10px;
        flex-wrap: nowrap;
    }

    .capcalera-premis-admin > span,
    .capcalera-premis-admin > .btn-noucomerc {
        flex: 0 0 auto;
    }

    .capcalera-premis-admin > .btn-noucomerc {
        width: auto;
    }

    #formulari-premi {
        padding: 12px !important;
    }

    .dades-premi-admin,
    .accions-premi-admin {
        flex-direction: column;
    }

    .dades-premi-admin label,
    .accions-premi-admin button {
        width: 100%;
    }

    .item-premi-admin {
        align-items: stretch !important;
        flex-direction: column;
        gap: 10px;
    }

    .item-premi-admin > div:last-child {
        justify-content: stretch;
    }

    .item-premi-admin > div:last-child button {
        flex: 1 1 120px;
        margin-right: 0 !important;
    }
}

.admin-comerc-item {
    background: #dfe5fd;
    border: none;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.admin-comerc-info {
    flex: 1;
    min-width: 0;
}

.admin-comerc-nom {
    color: #4b539c;
    display: block;
    font-size: 14px;
    word-break: break-word;
}

.admin-comerc-categoria {
    color: #888;
    font-size: 11px;
    display: inline-block;
    margin-top: 2px;
}

.admin-comerc-coordenades {
    margin: 2px 0 0;
    color: #555;
    font-size: 11px;
    word-break: break-word;
}

.admin-comerc-accions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-eliminarubi {
background:#e74c3c; 
transition: background-color 0.3s ease, transform 0.1s ease;
color:white; 
border:none; 
padding: 5px 10px; 
border-radius: 4px; 
font-size: 11px; 
cursor: pointer; 
font-weight: bold;
white-space: nowrap;
}

.btn-eliminarubi:hover {
    transform: scale(0.98);
    background-color:rgb(96, 34, 29);
}

.btn-editarubi {
background:#e67e22; 
transition: background-color 0.3s ease, transform 0.1s ease;
color:white; 
border: none; 
padding: 10px 15px; 
border-radius: 5px; 
font-size: 12px; 
cursor: pointer; 
font-weight: bold;
white-space: nowrap;
}

.btn-editarubi:hover {
    transform: scale(0.98);
    background-color:rgb(130, 93, 43);
}

@media (max-width: 900px) {
    .admin-comerc-item {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-comerc-accions {
        justify-content: stretch;
    }

    .admin-comerc-accions .btn-editarubi,
    .admin-comerc-accions .btn-eliminarubi {
        flex: 1 1 100%;
        width: 100%;
    }
}

#modal-premi {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}