/* PUDO dentro de Woo Blocks: el bloque y sus hijos ocupan el ancho disponible */
.wc-block-components-shipping-rates-control__package
  .wc-block-components-radio-control {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wc-block-components-radio-control #ctt_pudo_checkout_block,
#ctt_pudo_block,
#ctt-pudo-list-container,
#ctt_pudo_response,
#ctt-pudo-list,
.ctt-pudo-item,
.ctt-pudo-card {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* buscador y tabs a ancho completo */
#ctt_cp_input,
#ctt-pudo-tabs,
#ctt_pudo_response {
  width: 100%;
  max-width: 100%;
}

/* Mapa contenido */
#ctt-pudo-map {
  width: 100% !important;
  max-width: 100% !important;
  height: 400px;
  box-sizing: border-box;
}

/* Restaura el borde inferior para el bloque de envío que contiene CTT */
.wc-block-components-shipping-rates-control__package:has(#ctt_pudo_checkout_block) {
    border: 1px solid var(--ast-border-color, #d1d5db) !important;
    margin-bottom: 1em !important;
    padding-bottom: 1em;
}

#ctt-pudo-list-container {
    position: relative;
    z-index: 5;
}

#ctt-pudo-tabs {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin-top: 10px;
}

#tab-map.active,
#tab-list.active {
    box-shadow: inset 0 -2px 0 #e30613;
    z-index: 10;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 2px solid #e30613;
}

#tab-map.active::after,
#tab-list.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e30613;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #e30613;
}

#tab-map,
#tab-list {
    flex: 1;
    font-size: 18px;
    cursor: pointer;
    background-color: #fff;
    color: #000;
    padding: 10px;
    border-top: none;
    border-left: none;
    border-right: none;
    text-align: center;
    user-select: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-radius: 0;
    position: relative;
    border-bottom: 1px solid #e30613;
}

.ctt-pudo-clone {
  transition: all 0.2s ease;
  border: 1px solid #ddd;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin-bottom: 10px;
}

.ctt-pudo-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px !important;
    max-height: 30px;
}

.ctt-pudo-logo {
    margin-right: 8px;
}

.ctt-pudo-title {
    font-size: inherit !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    color: inherit !important;
    line-height: inherit !important; 
    margin: auto 0;
}

.ctt-pudo-logo-margin-bottom {
    margin-top: 5px !important;
}

.ctt-pudo-search {
    position: relative;
    max-width: 100%;
}

#ctt_cp_input.input-text {
    width: 100%;
    padding-right: 40px;
    height: auto;
    box-sizing: border-box;
}

#ctt_cp_search.ctt-pudo-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.ctt-pudo-horario {
    display: none;
    margin-top: 10px;
    font-size: 14px;
    font-weight: bold;
}

.ctt-pudo-horario.visible {
    display: block !important;
}

/* Estilo para el bloque principal */
#ctt_pudo_block {
    /*max-width: 500px;*/
    margin: 0 auto;
    /*background: #fafafa;
    border-radius: 8px;*/
}

/* Área donde se insertan los resultados */
.ctt-pudo-response {
    max-height: 800px;
    overflow-y: auto;
    /*margin-top: 15px;
    padding-right: 5px;
    /* para no tapar scrollbar */
}

/* Tarjetas individuales */

.ctt-pudo-item.selected .ctt-pudo-address-header {
    background-color: #fff6f6;
    /* o el color que prefieras */
}

.ctt-pudo-item.selected .ctt-pudo-address-header {
    border-bottom: 1px dashed #e30613;
}

.ctt-pudo-address-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 10px;
}

.ctt-pudo-address-header input[type="radio"] {
    flex-shrink: 0;
}

.ctt-pudo-header-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.ctt-pudo-item {
    /*margin-bottom: 10px;*/
    cursor: pointer;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    /*border-radius: 6px;
    padding: 10px;*/
    background: #fff;
    transition: border 0.2s;
    display: flex;
    align-items: flex-start;
    /* Alinea en la parte superior */
    gap: 10px;
}

.ctt-pudo-item:hover {
    border-color: #ccc;
}

.ctt-pudo-item.selected {
    background-color: #fff6f6;
    border: 2px solid #ccc;
}

.ctt-pudo-item input[type="radio"] {
    width: 22px;
    height: 22px;
    appearance: none;
    border: 2px solid #ccc;
    border-radius: 50%;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    display: inline-block;
    /*margin: 6px 10px 0 5px;*/
    vertical-align: top;
    transition: all 0.2s ease-in-out;
}

/* Estilo del radio seleccionado */
.ctt-pudo-item input[type="radio"]:checked {
    background-color: #e30613;
    border-color: #e30613;
}

/* SVG check blanco en el centro */
.ctt-pudo-item input[type="radio"]:checked::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transform: translate(-50%, -50%);
}

.ctt_selected_pudo {
    flex: 1;
}

.ctt-pudo-card {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ctt-pudo-single-card {
    display: none;
}

.ctt-pudo-name {
    font-weight: bold;
    font-size: 0.9rem;
}

.ctt-pudo-address {
    font-size: 0.75em;
    color: #555;
    margin-top: 5px;
}

.ctt-pudo-schedule {
    margin-top: -10px;
    font-size: 0.85em;
    color: #333;
    padding: 10px 10px 0 10px;
}

.ctt-nav-left,
.ctt-nav-right {
    flex: 1;
    font-size: 18px;
    cursor: pointer;
    background-color: #fff!important;
    color: #e30613!important;
    padding: 10px;
    border: 1px solid #ccc!important;
    text-align: center;
    user-select: none;
    transition: background-color 0.2s!important;
    border-radius: 0;
}

.ctt-pudo-counter {
    flex: 2;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    padding: 10px;
    background-color: #fff;
    user-select: none;
    border: 1px solid #ccc;
    border-radius: 0;
}

.ctt-nav-left,
.ctt-nav-right,
.ctt-pudo-counter {
    padding: 10px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Eliminar el borde azul del focus */
.ctt-nav-left:focus,
.ctt-nav-right:focus {
    background-color: #fff!important;
    color: #e30613!important;
    border-color: #ccc!important;
}

.ctt-nav-left:hover,
.ctt-nav-right:hover {
    background-color: #fff6f6!important;
    color: #e30613!important;
    border-color: #ccc!important;
}

#ctt-pudo-list {
    max-height: 400px;
    overflow-y: auto;
}

.leaflet-control-attribution a {
    display: none !important;
}

.ctt-pudo-horario-list {
    list-style: none;
    padding: 0px !important;
    margin: 5px 0 !important;
}

.ctt-pudo-horario-item {
    display: flex;
    justify-content: start;
    gap: 10px;
    line-height: 1.6;
    font-size: 0.75rem;
}

.ctt-day {
    width: 90px;
    font-weight: 600;
}

.ctt-hours {
    flex: 1;
    text-align: left;
}

.ctt-time-logo {
    width: 1rem;
    height: 1rem;
    margin-right: 6px;
    vertical-align: middle;
    display: inline-block;
}

.ctt-pudo-phone-inline {
    font-weight: normal;
    /*font-size: 0.7rem;*/
}

/*
.woocommerce-error.ctt-warning::before {
    content: none !important;
    display: none !important;
}
*/
.woocommerce-error.ctt-warning {
    font-size: 0.8rem !important;
}