/* Sezione scelta modalità di consegna - Design nuovo */
.rnb-delivery-choice-section {
    margin: 30px 0;
    padding: 0;
}

.rnb-delivery-choice-section h5 {
    color: #a8c1d8;
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 25px 0;
    text-align: left;
}

.rnb-delivery-options {
    display: flex;
    gap: 25px;
    justify-content: flex-start;
}

.rnb-delivery-option {
    flex: 1;
    max-width: 350px;
    position: relative;
}

.rnb-delivery-radio {
    display: none;
}

.rnb-delivery-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 25px 20px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 240px;
}



.rnb-delivery-card:hover {
    border-color: #d0d0d0;
}

.rnb-card-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    width: 100%;
}

.rnb-delivery-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rnb-delivery-icon i {
    font-size: 50px;
    color: #474978;
}

.rnb-check-mark {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    right: 0;
}

.rnb-check-empty {
    font-size: 30px;
    color: #d0d0d0;
    position: absolute;
}

.rnb-check-filled {
    font-size: 30px;
    color: #474978;
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.rnb-delivery-title {
    color: #474978;
    font-size: 20px !important;
    font-weight: 500 !important;
    margin: 0 0 15px 0 !important;
    text-align: center !important;
    line-height: 1.3 !important;
    width: 100%;
}

.rnb-select-button {
    background: #a8c1d8 !important;
    border: none !important;
    color: white !important;
    padding: 8px 24px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 auto !important;
    display: block !important;
    text-align: center !important;
}

.rnb-select-button:hover {
    background: #96b4d1 !important;
}

.rnb-delivery-select-wrapper {
    margin-top: 20px;
    margin-bottom: 15px;
    display: none; /* Nascosto di default */
}

.rnb-delivery-select-wrapper select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #718096;
    background: #ffffff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.rnb-directions-link {
    display: flex;
    align-items: center;
    color: #4a5568;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

.rnb-directions-link i {
    margin-right: 8px;
    font-size: 16px;
}

.rnb-directions-link:hover {
    color: #2d3748;
}

/* Stato selezionato - aggiorna la regola esistente */
.rnb-delivery-radio:checked+.rnb-delivery-card {
    border-color: #474978;
    background: #f9fbfd;
    justify-content: flex-start;
    height: auto;
    min-height: 240px;
}

.rnb-delivery-radio:checked+.rnb-delivery-card .rnb-check-empty {
    opacity: 0;
}

.rnb-delivery-radio:checked+.rnb-delivery-card .rnb-check-filled {
    opacity: 1;
}

.rnb-delivery-radio:checked+.rnb-delivery-card .rnb-delivery-select-wrapper,
.rnb-delivery-radio:checked+.rnb-delivery-card .rnb-directions-link {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .rnb-delivery-options {
        flex-direction: column;
        gap: 15px;
    }

    .rnb-delivery-option {
        max-width: 100%;
    }

    .rnb-delivery-card {
        padding: 20px;
        min-height: 180px;
    }

    .rnb-delivery-icon {
        width: 45px;
        height: 45px;
    }

    .rnb-delivery-icon i {
        font-size: 24px;
    }

    .rnb-delivery-title {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .rnb-delivery-choice-section h5 {
        font-size: 20px;
        text-align: center;
    }

    .rnb-delivery-card {
        padding: 18px;
        min-height: 160px;
    }

    .rnb-delivery-icon {
        width: 40px;
        height: 40px;
    }

    .rnb-delivery-icon i {
        font-size: 22px;
    }

    .rnb-check-mark i {
        font-size: 24px;
    }

    .rnb-delivery-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .rnb-delivery-select-wrapper select {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Stili per il dropdown personalizzato - identico all'originale */
#customPickupLocationPreview {
    margin: 20px 0;
}

#customPickupLocationPreview h5 {
    color: #a8c1d8;
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 15px 0;
    text-align: left;
}

#customPickupLocationPreview .rnb-select-box {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #4a5568;
    background: #ffffff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    transition: border-color 0.2s ease;
}

#customPickupLocationPreview .rnb-select-box:focus {
    outline: none;
    border-color: #a8c1d8;
    box-shadow: 0 0 0 3px rgba(168, 193, 216, 0.1);
}

#customPickupLocationPreview .rnb-select-box:hover {
    border-color: #cbd5e0;
}

/* Responsive per il dropdown personalizzato */
@media (max-width: 768px) {
    #customPickupLocationPreview h5 {
        font-size: 15px;
    }

    #customPickupLocationPreview .rnb-select-box {
        padding: 10px 12px;
        font-size: 13px;
        padding-right: 35px;
    }
}

#dropoffLocationPreview {
    display: none;
}

/* Trigger tooltip posizionato sotto il dropdown */
.rnb-location-below {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}

.rnb-location-below .rnb-location-tooltip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4a5568;
}

.rnb-location-below .rnb-location-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rnb-location-below .rnb-location-info-icon i {
font-size: 16px;
color: #6b7280;
}

.rnb-location-below .rnb-location-label {
font-size: 18px;
color: #6b7280;
white-space: nowrap;
}

@media (max-width: 768px) {
.rnb-location-below {
margin-top: 6px;
}
}

/* Stili per il campo CAP */
.rnb-postal-code-wrapper {
    margin-top: 20px;
    margin-bottom: 20px;
    display: none; /* Nascosto di default */
}

/* Mostra il campo CAP solo per la spedizione a domicilio */
#delivery-home:checked + .rnb-delivery-card .rnb-postal-code-wrapper {
    display: block;
}

.rnb-postal-code-wrapper label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.rnb-postal-code-wrapper .rnb-postal-code {
    width: 120px;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
    background: #ffffff;
    margin-right: 10px;
    text-align: center;
    font-weight: 500;
    margin-bottom: 10px
}

.rnb-postal-code-wrapper .rnb-postal-code:focus {
    outline: none;
    border-color: #474978;
    box-shadow: 0 0 0 2px rgba(71, 73, 120, 0.1);
}

.rnb-postal-code-wrapper .rnb-verify-postal-code {
    background: #474978 !important;
    border: none !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    vertical-align: top !important;
}

.rnb-postal-code-wrapper .rnb-verify-postal-code:hover {
    background: #3a3c68 !important;
}

.rnb-postal-code-wrapper .rnb-verify-postal-code:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
}

.rnb-shipping-options {
    margin-top: 15px;
}

.rnb-shipping-options select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #718096;
    background: #ffffff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* Responsive per il campo CAP */
@media (max-width: 768px) {
    .rnb-postal-code-wrapper {
        padding: 15px;
        text-align: center;
    }
    
    .rnb-postal-code-wrapper .rnb-postal-code {
        width: 100px;
        margin-right: 8px;
        margin-bottom: 10px;
    }
    
    .rnb-postal-code-wrapper .rnb-verify-postal-code {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .rnb-postal-code-wrapper {
        padding: 12px;
    }
    
    .rnb-postal-code-wrapper .rnb-postal-code {
        width: 90px;
        margin-right: 5px;
        margin-bottom: 8px;

    }
    
    .rnb-postal-code-wrapper .rnb-verify-postal-code {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }
}

/* Messaggi di feedback per il CAP */
.rnb-postal-code-message {
    margin: 15px 0;
    padding: 15px 18px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.6em;
}

.rnb-postal-code-message.rnb-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.rnb-postal-code-message.rnb-info {
    background: #e7f3f8;
    border: 1px solid #b8dce8;
    color: #0c5460;
}

.rnb-postal-code-message i {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Contenuto del messaggio strutturato */
.rnb-message-content {
    flex: 1;
}

.rnb-message-content p {
    margin: 0;
    padding: 0;
}

.rnb-message-main {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px !important;
    color: #0c5460;
}

.rnb-message-warning {
    font-size: 13px;
    line-height: 1.5;
    color: #0a4552;
    padding-top: 8px;
    border-top: 1px solid #b8dce8;
}

.rnb-message-warning strong {
    font-weight: 600;
    color: #084350;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .rnb-postal-code-message {
        font-size: 13px;
        padding: 12px 15px;
        gap: 10px;
    }
    
    .rnb-postal-code-message i {
        font-size: 16px;
    }
    
    .rnb-message-main {
        font-size: 13px;
        margin-bottom: 6px !important;
    }
    
    .rnb-message-warning {
        font-size: 12px;
        padding-top: 6px;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .rnb-postal-code-message {
        font-size: 12px;
        padding: 10px 12px;
        gap: 8px;
    }
    
    .rnb-postal-code-message i {
        font-size: 15px;
    }
    
    .rnb-message-main {
        font-size: 12px;
        margin-bottom: 5px !important;
    }
    
    .rnb-message-warning {
        font-size: 11px;
        padding-top: 5px;
        line-height: 1.4;
    }
}

/* Stili per opzione disabilitata - Design moderno e pulito */
.rnb-delivery-option.rnb-delivery-disabled {
    position: relative;
}

.rnb-delivery-option.rnb-delivery-disabled .rnb-delivery-card {
    position: relative;
    cursor: not-allowed;
    overflow: hidden;
    pointer-events: none;
}

/* Overlay elegante con blur */
.rnb-unavailable-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Contenuto del messaggio - Design elegante */
.rnb-unavailable-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
}

.rnb-unavailable-content i {
    font-size: 42px;
    color: #cbd5e0;
    opacity: 0.8;
}

.rnb-unavailable-content span {
    font-size: 14px;
    font-weight: 500;
    color: #718096;
    line-height: 1.5;
    max-width: 200px;
}

/* Effetto hover sul riquadro disabilitato */
.rnb-delivery-option.rnb-delivery-disabled:hover .rnb-unavailable-overlay {
    background: rgba(255, 255, 255, 0.95);
}

.rnb-delivery-option.rnb-delivery-disabled:hover .rnb-unavailable-content i {
    color: #a0aec0;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .rnb-unavailable-content {
        gap: 10px;
        padding: 18px;
    }
    
    .rnb-unavailable-content i {
        font-size: 38px;
    }
    
    .rnb-unavailable-content span {
        font-size: 13px;
        max-width: 180px;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .rnb-unavailable-overlay {
        backdrop-filter: blur(1.5px);
        -webkit-backdrop-filter: blur(1.5px);
    }
    
    .rnb-unavailable-content {
        gap: 8px;
        padding: 15px;
    }
    
    .rnb-unavailable-content i {
        font-size: 34px;
    }
    
    .rnb-unavailable-content span {
        font-size: 12px;
        max-width: 160px;
        line-height: 1.4;
    }
}