/**
 * Rentsi Core - Public Styles
 */

/* User Type Selection - Card e icone sempre visibili */
.rentsi-user-type-selection {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
}

.rentsi-user-type-options {
    display: flex !important;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 30px;
}

.rentsi-user-type-option {
    flex: 1;
    cursor: pointer;
    min-width: 0;
}

.rentsi-user-type-option input[type="radio"] {
    display: none;
}

.rentsi-option-content {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border: 2px solid #555;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    background-color: #1e1e1e !important;
    color: #fff !important;
    min-height: 180px;
}

.rentsi-user-type-option input:checked + .rentsi-option-content {
    border-color: #ef792a !important;
    background-color: rgba(30, 30, 30, 0.98) !important;
    box-shadow: 0 0 0 2px rgba(239, 121, 42, 0.3);
}

/* Icone Dashicons visibili sulla pagina seleziona-tipo-account */
.rentsi-option-icon,
.rentsi-option-icon.dashicons {
    display: inline-block !important;
    width: 48px !important;
    height: 48px !important;
    font-size: 48px !important;
    line-height: 1 !important;
    margin-bottom: 15px;
    color: #ef792a !important;
    font-family: dashicons !important;
}

.rentsi-option-icon.dashicons-admin-users:before {
    content: "\f110" !important;
    color: #ef792a !important;
}

.rentsi-option-icon.dashicons-building:before {
    content: "\f512" !important;
    color: #ef792a !important;
}

.rentsi-option-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff !important;
    margin-bottom: 8px;
}

.rentsi-option-desc {
    font-size: 14px;
    color: #ccc !important;
}

.rentsi-business-fields {
    background: rgba(30, 30, 30, 0.95);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #555;
}

.rentsi-business-fields h3 {
    margin-top: 0;
    color: #ef792a !important;
}

.rentsi-business-fields label {
    color: #fff !important;
}

.rentsi-business-fields .input-text {
    background-color: #2a2a2a;
    border-color: #555;
    color: #fff;
}

.rentsi-button-primary {
    background-color: #ef792a !important;
    border-color: #ef792a !important;
    color: #fff !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
}

.rentsi-button-primary:hover {
    background-color: #d96a20 !important;
    border-color: #d96a20 !important;
}

/* Dashboard Styles */
.rentsi-my-rentals,
.rentsi-bookings,
.rentsi-billing-data {
    padding: 20px 0;
}

.rentsi-my-rentals h2,
.rentsi-bookings h2,
.rentsi-billing-data h2 {
    color: #1e4085;
    margin-bottom: 10px;
}

.rentsi-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.rentsi-status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.rentsi-status-processing {
    background-color: #cce5ff;
    color: #004085;
}

.rentsi-status-on-hold {
    background-color: #f8d7da;
    color: #721c24;
}

.rentsi-status-completed {
    background-color: #d4edda;
    color: #155724;
}

/* Messages */
.rentsi-messages {
    margin-top: 20px;
}

/* Form Styles - Evitare testo bianco su sfondo bianco */
.rentsi-form .form-row {
    margin-bottom: 15px;
}

.rentsi-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.rentsi-form .input-text,
.rentsi-form input[type="text"],
.rentsi-form input[type="email"],
.rentsi-form input[type="tel"],
.rentsi-form input[type="password"],
.rentsi-form select,
.rentsi-form textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #2a2a2a !important;
    color: #fff !important;
}

.rentsi-form .input-text::placeholder,
.rentsi-form input::placeholder,
.rentsi-form textarea::placeholder {
    color: #aaa;
}

.rentsi-form .input-text:focus,
.rentsi-form input:focus,
.rentsi-form select:focus,
.rentsi-form textarea:focus {
    border-color: #ef792a;
    outline: none;
    background-color: #2a2a2a !important;
    color: #fff !important;
}

/* Evitare evidenziazione bianca al click/focus: selezione testo leggibile */
.rentsi-form input::selection,
.rentsi-form textarea::selection,
.woocommerce-account input::selection,
.woocommerce-account textarea::selection {
    background-color: #ef792a;
    color: #fff;
}

.rentsi-form input,
.rentsi-form textarea {
    caret-color: #ef792a;
}

.rentsi-form select option {
    background-color: #2a2a2a;
    color: #fff;
}

/* Form login/registrazione WooCommerce: stesso stile focus e selezione */
.woocommerce-form-login input[type="text"],
.woocommerce-form-login input[type="password"],
.woocommerce-form-login input[type="email"] {
    background-color: #2a2a2a !important;
    color: #fff !important;
}

.woocommerce-form-login input:focus {
    background-color: #2a2a2a !important;
    color: #fff !important;
}

.woocommerce-form-login input::selection {
    background-color: #ef792a;
    color: #fff;
}

/* Evitare sfondo bianco su autofill / suggerimenti browser: testo sempre leggibile */
.rentsi-form input:-webkit-autofill,
.rentsi-form input:-webkit-autofill:hover,
.rentsi-form input:-webkit-autofill:focus,
.rentsi-form input:-webkit-autofill:active,
.woocommerce-account input:-webkit-autofill,
.woocommerce-account input:-webkit-autofill:hover,
.woocommerce-account input:-webkit-autofill:focus,
.woocommerce-account input:-webkit-autofill:active,
.woocommerce-form-login input:-webkit-autofill,
.woocommerce-form-login input:-webkit-autofill:hover,
.woocommerce-form-login input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0 1000px #2a2a2a inset !important;
    box-shadow: 0 0 0 1000px #2a2a2a inset !important;
    caret-color: #ef792a;
}

/* Selezione testo negli input form account/login (anche dopo suggerimento) */
.rentsi-form input::selection,
.rentsi-form textarea::selection,
.woocommerce-account input::selection,
.woocommerce-account textarea::selection,
.woocommerce-form-login input::selection {
    background-color: #ef792a !important;
    color: #fff !important;
}

.rentsi-form input:focus,
.rentsi-form textarea:focus,
.woocommerce-account input:focus,
.woocommerce-account textarea:focus,
.woocommerce-form-login input:focus {
    background-color: #2a2a2a !important;
    color: #fff !important;
}

/* Dark Mode Theme Compatibility */
body.dark-mode .rentsi-user-type-selection,
.ip-page-template .rentsi-user-type-selection,
.woocommerce-account .rentsi-user-type-selection {
    background-color: transparent;
}

body.dark-mode .rentsi-option-content,
.ip-page-template .rentsi-option-content {
    border-color: #444;
    background-color: rgba(30, 30, 30, 0.8);
}

body.dark-mode .rentsi-option-title,
.ip-page-template .rentsi-option-title {
    color: #fff;
}

body.dark-mode .rentsi-option-desc,
.ip-page-template .rentsi-option-desc {
    color: #aaa;
}

body.dark-mode .rentsi-user-type-option input:checked + .rentsi-option-content,
.ip-page-template .rentsi-user-type-option input:checked + .rentsi-option-content {
    border-color: #ef792a;
    background-color: rgba(239, 121, 42, 0.15);
}

body.dark-mode .rentsi-business-fields,
.ip-page-template .rentsi-business-fields {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #444;
}

body.dark-mode .rentsi-business-fields h3,
.ip-page-template .rentsi-business-fields h3 {
    color: #ef792a;
}

body.dark-mode .rentsi-form .input-text,
.ip-page-template .rentsi-form .input-text {
    background-color: #1a1a1a;
    border-color: #444;
    color: #fff;
}

body.dark-mode .rentsi-form label,
.ip-page-template .rentsi-form label {
    color: #fff;
}

/* Antek Theme Integration */
.rentsi-user-type-selection h2 {
    color: #ef792a;
    font-size: 28px;
    margin-bottom: 15px;
}

.rentsi-user-type-selection p {
    color: #ccc;
    margin-bottom: 25px;
}

/* Duplicate dashicons rules removed - gestito sopra in User Type Selection */

/* WooCommerce Form Integration - Input sempre leggibili (no bianco su bianco) */
.woocommerce-account .woocommerce-form-row label {
    color: #fff;
}

.woocommerce-account .woocommerce-Input,
.woocommerce-account .input-text,
.woocommerce-account input[type="text"],
.woocommerce-account input[type="email"],
.woocommerce-account input[type="tel"],
.woocommerce-account input[type="password"],
.woocommerce-account select,
.woocommerce-account textarea {
    background-color: #2a2a2a !important;
    border: 1px solid #555 !important;
    color: #fff !important;
}

.woocommerce-account .woocommerce-Input::placeholder,
.woocommerce-account input::placeholder {
    color: #aaa;
}

.woocommerce-account .woocommerce-Input:focus,
.woocommerce-account input:focus,
.woocommerce-account select:focus,
.woocommerce-account textarea:focus {
    border-color: #ef792a !important;
    box-shadow: 0 0 0 2px rgba(239, 121, 42, 0.2);
    background-color: #2a2a2a !important;
    color: #fff !important;
}

/* Cursore e selezione sempre visibili negli input (no bianco su bianco) */
.woocommerce-account input,
.woocommerce-account textarea {
    caret-color: #ef792a;
}

.woocommerce-account select option {
    background-color: #2a2a2a;
    color: #fff;
}

.woocommerce-account .woocommerce-form__label-for-checkbox span {
    color: #ccc;
}

.woocommerce-account .woocommerce-form__label-for-checkbox a {
    color: #ef792a;
}

.woocommerce-account .woocommerce-Button,
.woocommerce-account button.button {
    background-color: #ef792a !important;
    border-color: #ef792a !important;
    color: #fff !important;
}

.woocommerce-account .woocommerce-Button:hover,
.woocommerce-account button.button:hover {
    background-color: #d96a20 !important;
    border-color: #d96a20 !important;
}

/* Alert fisso password temporanea (sotto "Logged in as ... Logout") */
.rentsi-password-notice.rentsi-alert-fisso {
    background: rgba(239, 121, 42, 0.15);
    border: 1px solid #ef792a;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #fff;
}

.rentsi-password-notice.rentsi-alert-fisso p {
    margin: 0;
    color: #eee;
}

/* Card prezzo dettaglio mezzo (catalogo): sfondo nero, bordo arancione, testo leggibile */
.c-vehicle-book__price {
    background-color: #000 !important;
    border: 1px solid #ef792a !important;
    border-radius: 4px;
    color: #fff !important;
}

.c-vehicle-book__price *,
.c-vehicle-book__price .js-price-original,
.c-vehicle-book__price .c-vehicle-book__price-wrap,
.c-vehicle-book__price .c-vehicle-book__amount,
.c-vehicle-book__price .woocommerce-Price-amount,
.c-vehicle-book__price .woocommerce-Price-currencySymbol,
.c-vehicle-book__price .c-vehicle-book__cnt,
.c-vehicle-book__price .c-vehicle-book__cnt-value,
.c-vehicle-book__price .js-book-cnt {
    background-color: transparent !important;
    color: #fff !important;
    border-color: transparent !important;
}

/* Catalogo e dettaglio mezzo: input con valore leggibile (no bianco su bianco) */
.c-vehicle-book input,
.c-vehicle-book select,
.c-vehicle-book textarea,
[class*="catalog"] input,
[class*="catalog"] select,
[class*="catalog"] textarea,
.c-vehicle-book .input-text,
.c-vehicle-book .woocommerce-Input {
    background-color: #2a2a2a !important;
    border: 1px solid #555 !important;
    color: #fff !important;
}

.c-vehicle-book input::placeholder,
[class*="catalog"] input::placeholder {
    color: #aaa;
}

.c-vehicle-book input:focus,
.c-vehicle-book select:focus,
[class*="catalog"] input:focus,
[class*="catalog"] select:focus {
    background-color: #2a2a2a !important;
    color: #fff !important;
    border-color: #ef792a !important;
}

/* Select: tendina con sfondo scuro e testo chiaro (catalogo, form, account) */
.rentsi-form select,
.woocommerce-account select,
.woocommerce-form-login select,
.c-vehicle-book select,
[class*="catalog"] select,
.c-vehicle-book__price + * select {
    background-color: #2a2a2a !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

.rentsi-form select option,
.woocommerce-account select option,
.woocommerce-form-login select option,
.c-vehicle-book select option,
[class*="catalog"] select option {
    background-color: #2a2a2a !important;
    color: #fff !important;
}

.rentsi-form select:focus,
.woocommerce-account select:focus,
.c-vehicle-book select:focus,
[class*="catalog"] select:focus {
    background-color: #2a2a2a !important;
    color: #fff !important;
}

/* Required field indicator */
.required {
    color: #ef792a;
}

/* Nascondi sidebar sulla pagina Seleziona tipo account */
body.rentsi-no-sidebar .post-sidebar,
body.rentsi-no-sidebar [class*="sidebar"],
body.rentsi-no-sidebar .widget-area,
body.rentsi-no-sidebar aside[class*="sidebar"],
body.rentsi-no-sidebar .ip-sidebar {
    display: none !important;
}

body.rentsi-no-sidebar .ip-content,
body.rentsi-no-sidebar .content-area,
body.rentsi-no-sidebar main {
    width: 100% !important;
    max-width: 100% !important;
}

/* Responsive */
@media (max-width: 768px) {
    .rentsi-user-type-options {
        flex-direction: column;
    }
    
    .rentsi-user-type-selection {
        padding: 15px;
    }
    
    .rentsi-option-content {
        padding: 20px 15px;
    }
}
