@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

body {
    background-color: #FFFFFF;
}

.contact-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    align: center;
    background-color: #e0e0e0;
    color: #333;
    text-align: left;
    padding: 10px;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    font-family: 'Roboto', sans-serif;
}

.center-box{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 3rem;
}

.main-portal {
    max-width: 79.375em;
    justify-content: space-between;
    padding-left: 3.125em;
    padding-right: 3.125em;
    padding-bottom: 300px;
    font-family: 'Roboto', sans-serif;
    text-align: justify;
    hyphens: auto;
}



.contact-footer-content {
    font-family: 'Roboto', sans-serif;
    max-width: 79.375em;
    justify-content: space-between;
    padding-left: 3.125em;
    padding-right: 3.125em;
}


.main-portal li {
    list-style-type: disc;
    margin-left: 1.5em;
}

.form-box {
    max-width: 79.375em;
    justify-content: space-between;
    padding-left: 3.125em;
    padding-right: 3.125em;
    box-sizing: border-box;
}

.form-box-date {
    justify-content: space-between;
    box-sizing: border-box;
}

.form-box a {
    text-decoration: underline;
}

.instruction-title span{
    font-family: 'Roboto', sans-serif;
    text-align: left;
    font-size: 36;
    font-weight: bold;
}

.instruction-title-date {
    width: 100%;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    font-size: 36;
    font-weight: bold;
}

.center-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px); /* Resta la altura del header si es necesario */
}

.search-box {
    position: relative;
    display: inline-block;
    margin-top: 1em;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 18px;
}

.procedeix-btn {
    background-color: rgba(230, 0, 0, 0.85);
    color: white;
    border: none;
    width: 100%;
    padding: 4px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: transform 0.1s ease, background-color 0.2s ease;
    outline: none;
}

.procedeix-btn:active {
    transform: scale(0.96);
    background-color: rgba(200, 0, 0, 0.9);
    box-shadow: 0 0 0 4px rgba(230, 0, 0, 0.3);
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    background: white;
    border: 1px solid #ccc;
    z-index: 1000;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.autocomplete-results div {
    padding: 8px;
    cursor: pointer;
}

.autocomplete-results div:hover {
    background-color: #f0f0f0;
}

.dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    font-family: 'Segoe UI', sans-serif;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.dialog.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.dialog-content {
    background: #ffffff;
    color: #333;
    padding: 40px 30px 20px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.3s ease;
    position: relative;
}

.dialog-content-left {
    text-align: justify;
    padding-bottom: 1em;
}

.dialog-content-left li {
    list-style: none;
    position: relative;
    margin-left: 1.5em;
    padding-left: 1em;
}

.dialog-content-left li::before {
    content: "-";
    position: absolute;
    left: 0;
    color: inherit;
}

.dialog-button {
    background-color: rgba(230, 0, 0, 0.85);
    color: white;
    border: none;
    margin-top: 1em;
    padding: 4px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: transform 0.1s ease, background-color 0.2s ease;
    outline: none;
}

.dialog-button:active {
    transform: scale(0.96);
    background-color: rgba(200, 0, 0, 0.9);
    box-shadow: 0 0 0 4px rgba(230, 0, 0, 0.3);
}

.floating-back-button {
    position: fixed;
    bottom: 1.5em;
    left: 1.5em;
    background-color: rgba(255, 0, 0, 0.4); /* rojo traslúcido */
    color: white;
    border: none;
    border-radius: 50%;
    padding: 1em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    font-size: 1.2em;
    transition: background-color 0.3s;
}

.floating-back-button:active {
    transform: scale(0.96);
    background-color: rgba(200, 0, 0, 0.9);
    box-shadow: 0 0 0 4px rgba(230, 0, 0, 0.3);
}

.floating-procedeix-button {
    position: fixed;
    bottom: 1.5em;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(230, 0, 0, 0.85);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    font-size: 1.2em;
    transition: background-color 0.3s;
}

.floating-procedeix-button:active {
    transform: translateX(-50%) scale(0.96);
    background-color: rgba(200, 0, 0, 0.9);
    box-shadow: 0 0 0 4px rgba(230, 0, 0, 0.3);
}

.date-grid {
    display: flex;
    gap: 0.5em;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin-top: 1em;
    padding-top: 2em;
    padding-bottom: 2em;
    padding-left: 1em;
    padding-right: 1em;
    scroll-padding-left: 1em;
    scroll-behavior: smooth;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    width: 100%;            /* Se asegura de que no se reduzca */
    box-sizing: border-box; /* Evita que el padding rompa el diseño */
}

.date-card {
    flex: 0 0 auto;
    min-width: 90px;
    text-align: center;
    border: 2px solid #333;
    border-radius: 1em;
    padding: 0.5em;
    font-family: 'Roboto', sans-serif;
    background-color: white;
    cursor: pointer;
    color: #000;
}

.date-card.selected {
    border-color: #e65c5c;
    background-color: #ffe6e6;
}

.date-card .dia {
    font-weight: bold;
    margin-bottom: 0.2em;
}

.date-card .icon {
    font-size: 1.5em;
    margin-bottom: 0.2em;
    color: #444;
}

.box-general-motius {
    width: 100%;
    min-height: 100dvh;
    padding: 1.25rem 1rem;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.motius-grid {
    width: 100%;
    max-width: 860:
    margin: 0 auto;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    min-height: 0;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
}

/* Caja */
.motiu-card {
  background: var(--card-bg, #fff);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  text-align: left;
}

.motiu-card:hover { border-color: #cfd4dc; }
.motiu-card:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, .3); }

/* Cabecera: título + botón */
.motiu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.motiu-title {
  margin: 0;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
}

/*Indicador +/- según aria-expanded*/
.motiu-indicator {
  pointer-events: none;         /* no clicable */
  font-size: 1.25rem;
  line-height: 1;
  margin-left: 8px;
}
.motiu-card[aria-expanded="false"] .motiu-indicator::before { content: "+"; }
.motiu-card[aria-expanded="true"]  .motiu-indicator::before { content: "−"; } /* U+2212 */

/* El cuerpo se muestra cuando está abierto */
.motiu-card.open .motiu-body { display: block; }

.motiu-card.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .25);
}

/* Cuerpo (colapsable) */
.motiu-body {
  display: none; /* se muestra al expandir */
  margin-top: .6rem;
  color: #374151;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
  line-height: 1.45;
}

.motiu-card.open .motiu-body { display: block; }

.motiu-item {
    padding: 1em;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: justify;
}

.motiu-item.selected {
    border-color: #e65c5c;
    background-color: #ffe6e6;
}

.info-container {
    display: flex;
    text-align: left;
    flex-direction: column;
    gap: 0.7em;
    padding: 1em;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
    width: min(100%, 960px);
    max-width: 600px;
}

.info-field {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-weight: 600;
    font-size: 0.7em;
    margin-bottom: 0.3em;
    color: #333;
}

.info-input,
.info-textarea {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.5em;
    font-size: 0.9em;
    background-color: #f5f5f5;
    color: #666;
    width: 100%;
    box-sizing: border-box;
    text-align: justify;
}

.info-input:disabled,
.info-textarea:disabled {
    background-color: #f5f5f5;
    color: #666;
}

.info-textarea {
    resize: vertical;
    font-size: 0.8em;
    height: 140px;
}

.iconaComptador {
    text-align: center;
    margin-bottom: 12px;
}

.iconaComptador svg {
    width: 64px;
    height: 64px;
}

.textMissatgeComptador {
    text-align: center;
    font-size: 3.5rem;
    line-height: 1.6;
}

@keyframes fadeIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Per a pantalles de fins a 768px (tablets y mòbils) */
@media (max-width: 768px) {
    .main-portal {
        padding-left: 0.3em;
        padding-right: 0.3em;
    }

    .contact-footer-content {
        padding-left: 0.2em;
        padding-right: 0.2em;
    }

    .form-box {
        padding-left: 1em;
        padding-right: 1em;
    }

    .form-box-date {
        width: 100%;
    }
}

@media (min-width: 768px) {
    .floating-back-button {
        display: none;
    }

    .form-box-date {
        padding-left: 3.125em;
        padding-right: 3.125em;
        max-width: 79.375em;
    }

    .motius-grid {
        padding-left: 3.125em;
        padding-right: 3.125em;
    }

    .info-container{
        padding-left: 3.125em;
        padding-right: 3.125em;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    text-align: center;
    position: relative;
}

#video {
    width: 100%;
    max-height: 300px;
    background: black;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.estat-matricula {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: bold;
}

.spinner {
    margin-left: 10px;
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-cancel {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    background-color: #d9534f;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
}

#map {
    width: 100%;
    height: calc(100vh - 200px);
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 8px;
}

.btn-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(230, 0, 0, 0.85);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    text-align: center;
    line-height: 26px;
    padding: 0;
    transition: background-color 0.3s ease;
}

.btn-close:hover {
    background-color: #c9302c;
}

.btn-ubicacio {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 1.5em 2.5em;
    font-size: 1.6em;
    background-color: white;
    border: 2px solid #666;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: background-color 0.3s, transform 0.2s;
}

.btn-ubicacio:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.popup-custom {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

/* Estilos para el Switch Coche/Moto */
.vehicle-switch-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px; /* Separación con el input de matrícula */
    width: 100%;
}

/* Ocultamos los radio buttons reales */
.vehicle-switch-container input[type="radio"] {
    display: none;
}

/* Estilo base de los botones (Labels) */
.switch-label {
    flex: 1;
    padding: 10px;
    text-align: center;
    background-color: #f0f0f0; /* Gris claro inactivo */
    color: #555;
    cursor: pointer;
    border: 1px solid #ccc;
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;       /* Para alinear icono y texto */
    align-items: center;
    justify-content: center;
    gap: 8px;            /* Espacio entre icono y texto */
}

/* Bordes redondeados para crear efecto pastilla unida */
.switch-label.left {
    border-radius: 5px 0 0 5px;
    border-right: none; /* Quitar doble borde en el medio */
}

.switch-label.right {
    border-radius: 0 5px 5px 0;
}

/* ESTADO ACTIVO: Cuando el radio asociado está checked */
input[type="radio"]:checked + label {
    background-color: #b10000;
    color: white;
    border-color: #b10000;
}

/* Hover suave */
.switch-label:hover {
    background-color: #e0e0e0;
}
input[type="radio"]:checked + label:hover {
    background-color: #900000;
}



