[data-rebn-noleggio] {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-sizing: border-box;
    color: #111827;
}

[data-rebn-noleggio],
[data-rebn-noleggio] * {
    box-sizing: border-box;
}

[data-rebn-noleggio] span,
[data-rebn-noleggio] p,
[data-rebn-noleggio] div,
[data-rebn-noleggio] label {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.rebn-header {
    margin-bottom: 20px;
    text-align: center;
}

.rebn-kicker {
    margin: 0 0 6px;
    color: #166534;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rebn-header h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
}

.rebn-header p {
    max-width: 680px;
    margin: 10px auto 0;
    color: #4b5563;
}

.rebn-section {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f9fafb;
}

.rebn-section h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.rebn-hidden {
    display: none !important;
}

.rebn-date-grid,
.rebn-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rebn-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.rebn-field-full {
    margin-top: 14px;
}

[data-rebn-noleggio] input,
[data-rebn-noleggio] textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 11px 12px;
    background: #ffffff;
    color: #111827;
    font-size: 15px;
    line-height: 1.3;
}

[data-rebn-noleggio] textarea {
    resize: vertical;
}

[data-rebn-noleggio] input:focus,
[data-rebn-noleggio] textarea:focus {
    outline: 2px solid rgba(32, 172, 29, 0.18);
    border-color: #20AC1D;
}

.rebn-button {
    display: inline-flex;
    min-height: 40px;
    margin-top: 14px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.rebn-button:hover {
    transform: translateY(-1px);
}

.rebn-button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.rebn-button-primary {
    width: 100%;
    background: #20AC1D;
    color: #ffffff;
}

.rebn-button-primary:hover {
    background: #1b9419;
}

.rebn-button-secondary {
    background: #20AC1D;
    color: #ffffff;
}

.rebn-button-secondary:hover {
    background: #1b9419;
}

.rebn-submit-area {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.rebn-submit-area .rebn-button {
    margin-top: 0;
}

.rebn-submit-area .rebn-button-primary {
    width: auto;
    min-width: 220px;
}

.rebn-inline-alert {
    display: none;
    flex: 1 1 260px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.rebn-inline-alert:not(:empty) {
    display: block;
}

.rebn-inline-alert-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.rebn-inline-alert-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.rebn-help {
    margin: 10px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.rebn-alert {
    margin: 0 0 16px;
    padding: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.rebn-alert:not(:empty) {
    padding: 12px 14px;
}

.rebn-alert-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.rebn-alert-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.rebn-summary {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #166534;
    font-size: 14px;
    font-weight: 800;
}

.rebn-vehicles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.rebn-vehicle-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 18px;
    background: #ffffff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.rebn-vehicle-card:hover {
    border-color: #20AC1D;
    transform: translateY(-1px);
}

.rebn-vehicle-card.rebn-selected {
    border-color: #20AC1D;
    box-shadow: 0 0 0 3px rgba(32, 172, 29, 0.16);
}

.rebn-select-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: inline-flex;
    max-width: calc(100% - 24px);
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
}

.rebn-select-pill input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #20AC1D;
}

.rebn-vehicle-image {
    display: flex;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px;
}

.rebn-vehicle-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

.rebn-vehicle-content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 6px;
}

.rebn-vehicle-title {
    display: block;
    color: #111827;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.2;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

.rebn-vehicle-meta,
.rebn-vehicle-description,
.rebn-vehicle-prices {
    display: block;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

.rebn-vehicle-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rebn-vehicle-total {
    margin-top: auto;
    padding-top: 8px;
    color: #166534;
    font-size: 15px;
    font-weight: 900;
}

.rebn-empty {
    grid-column: 1 / -1;
    padding: 18px;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    background: #ffffff;
    color: #6b7280;
    text-align: center;
    font-weight: 700;
}

.rebn-privacy {
    display: flex;
    gap: 10px;
    margin: 14px 0 0;
    align-items: flex-start;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.4;
}

.rebn-privacy input {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: #20AC1D;
}

@media (max-width: 1100px) {
    [data-rebn-noleggio] {
        max-width: 960px;
    }

    .rebn-vehicles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    [data-rebn-noleggio] {
        padding: 16px;
    }

    .rebn-date-grid,
    .rebn-form-grid,
    .rebn-vehicles {
        grid-template-columns: 1fr;
    }

    .rebn-section {
        padding: 14px;
    }

    .rebn-submit-area {
        align-items: stretch;
        flex-direction: column;
    }

    .rebn-submit-area .rebn-button-primary {
        width: 100%;
        min-width: 0;
    }

    .rebn-select-pill {
        top: 10px;
        right: 10px;
        padding: 6px 8px;
        font-size: 11px;
    }

    .rebn-vehicle-title {
        font-size: 16px;
    }
}


/* Override temi/builder WordPress che impostano colori propri sui <button>. */
[data-rebn-noleggio] .rebn-button,
[data-rebn-noleggio] button.rebn-button,
[data-rebn-noleggio] .rebn-button-primary,
[data-rebn-noleggio] .rebn-button-secondary {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: #20AC1D !important;
    background-color: #20AC1D !important;
    background-image: none !important;
    border-color: #20AC1D !important;
    color: #ffffff !important;
    box-shadow: none;
}

[data-rebn-noleggio] .rebn-button:hover,
[data-rebn-noleggio] button.rebn-button:hover,
[data-rebn-noleggio] .rebn-button-primary:hover,
[data-rebn-noleggio] .rebn-button-secondary:hover {
    background: #1b9419 !important;
    background-color: #1b9419 !important;
    background-image: none !important;
    border-color: #1b9419 !important;
    color: #ffffff !important;
}

[data-rebn-noleggio] .rebn-button:focus,
[data-rebn-noleggio] button.rebn-button:focus {
    outline: 2px solid rgba(32, 172, 29, 0.28) !important;
    outline-offset: 2px;
}



/* Override forte per temi/builder che caricano stili dopo il plugin. */
[data-rebn-noleggio].rebn-widget button.rebn-button,
[data-rebn-noleggio].rebn-widget .rebn-button,
[data-rebn-noleggio].rebn-widget button.rebn-button-primary,
[data-rebn-noleggio].rebn-widget button.rebn-button-secondary,
[data-rebn-noleggio].rebn-widget button[data-rebn-check],
[data-rebn-noleggio].rebn-widget button[data-rebn-submit] {
    background: #20AC1D !important;
    background-color: #20AC1D !important;
    background-image: none !important;
    border: 1px solid #20AC1D !important;
    color: #ffffff !important;
}

[data-rebn-noleggio].rebn-widget button.rebn-button:hover,
[data-rebn-noleggio].rebn-widget .rebn-button:hover,
[data-rebn-noleggio].rebn-widget button.rebn-button-primary:hover,
[data-rebn-noleggio].rebn-widget button.rebn-button-secondary:hover,
[data-rebn-noleggio].rebn-widget button[data-rebn-check]:hover,
[data-rebn-noleggio].rebn-widget button[data-rebn-submit]:hover {
    background: #1b9419 !important;
    background-color: #1b9419 !important;
    border-color: #1b9419 !important;
    color: #ffffff !important;
}
