/* Menu di condivisione della pagina immobile */

.sc-share-menu[hidden] {
    display: none;
}

.sc-share-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    margin-top: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.sc-share-menu a,
.sc-share-menu button {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    color: #1f2937;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.sc-share-menu a:hover,
.sc-share-menu button:hover {
    background: #e5e7eb;
}

#sc-share-message {
    width: 100%;
    text-align: center;
    font-size: 14px;
}

/* Finestra di prenotazione visita */

.sc-visit-modal[hidden] {
    display: none;
}

.sc-visit-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.7);
}

.sc-visit-modal-content {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.sc-visit-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    padding: 4px 10px;
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

/* Modulo prenotazione visita */

.sc-visit-form-group {
    margin: 20px 0;
}

.sc-visit-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.sc-visit-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    box-sizing: border-box;
}

.sc-visit-submit {
    width: 100%;
    padding: 14px 20px;
    border: 0;
    border-radius: 8px;
    background: #176b45;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.sc-visit-submit:hover {
    background: #105334;
}

/* Messaggio alternativo e adattamento smartphone */

.sc-visit-fallback[hidden] {
    display: none;
}

.sc-visit-fallback {
    margin-top: 20px;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}

.sc-visit-fallback a {
    color: #176b45;
    font-weight: 600;
}

@media (max-width: 600px) {
    .sc-visit-modal {
        padding: 12px;
    }

    .sc-visit-modal-content {
        padding: 24px 18px;
    }
}

/* Struttura generale della scheda immobile */

.sc-auction-single {
    padding: 32px 16px 64px;
    background: #f8fafc;
}

.sc-auction-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.sc-auction-detail {
    min-width: 0;
}

.sc-auction-header {
    margin-bottom: 28px;
}

.sc-auction-eyebrow {
    margin-bottom: 10px;
    color: #176b45;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sc-auction-title {
    margin: 0 0 12px;
    color: #172033;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
}

.sc-auction-locality {
    margin: 0 0 16px;
    color: #475569;
    font-size: 18px;
}

.sc-auction-procedure {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    color: #475569;
    font-size: 14px;
}

/* Prezzi e date dell'asta */

.sc-auction-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.sc-auction-summary-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.sc-auction-summary-primary {
    background: #ffffff;
    border-color: #e2e8f0;
}

.sc-auction-summary-label {
    color: #64748b;
    font-size: 14px;
}

.sc-auction-summary-value {
    color: #172033;
    font-size: 22px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.sc-auction-summary-primary .sc-auction-summary-value {
    color: #172033;
    font-size: 28px;
}

.sc-auction-summary-item:nth-child(4) .sc-auction-summary-value,
.sc-auction-summary-deadline .sc-auction-summary-value {
    font-size: 14px;
    line-height: 1.4;
}

/* Pulsanti azioni asta */
.sc-auction-actions{display:flex;flex-wrap:wrap;gap:12px;margin:24px 0 32px;align-items:center}
.sc-auction-action{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 22px;border:1px solid #176b45;border-radius:8px;background:#fff;color:#176b45;font:inherit;font-weight:600;text-decoration:none;cursor:pointer;box-sizing:border-box}
.sc-auction-action:hover{background:#ecfdf5;color:#105334}
.sc-auction-action-visit{background:#176b45;color:#fff}
.sc-auction-action-visit:hover{background:#105334;color:#fff}
.sc-share-menu{flex-basis:100%}
@media(max-width:600px){.sc-auction-action{flex:1 1 100%}}

/* Galleria fotografica */
.sc-auction-gallery{margin:0 0 32px}
.sc-auction-gallery-main{position:relative;overflow:hidden;border-radius:14px;background:#e2e8f0}
.sc-auction-gallery-slide{display:none;margin:0;aspect-ratio:16/9}
.sc-auction-gallery-slide.is-active{display:block}
.sc-auction-gallery-slide img{display:block;width:100%;height:100%;object-fit:contain}
.sc-auction-no-image{display:flex;align-items:center;justify-content:center;min-height:300px;background:#e2e8f0;border-radius:14px;color:#64748b}

/* Navigazione galleria */
.sc-auction-gallery-controls{display:flex;align-items:center;justify-content:center;gap:24px;margin-top:14px}
.sc-auction-gallery-controls button{width:46px;height:46px;border:1px solid #cbd5e1;border-radius:50%;background:#fff;color:#176b45;font-size:24px;cursor:pointer}
.sc-auction-gallery-controls button:hover{background:#ecfdf5}
#sc-gallery-counter{min-width:65px;text-align:center;font-weight:600;color:#334155}

/* Caratteristiche immobile */
.sc-auction-details,.sc-auction-description,.sc-auction-documents,.sc-auction-location{margin:0 0 32px}
.sc-auction-details h2,.sc-auction-description h2,.sc-auction-documents h2,.sc-auction-location h2{margin:0 0 20px;color:#172033;font-size:26px;line-height:1.3}
.sc-auction-details-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin:0}
.sc-auction-detail-item{padding:18px 20px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;min-width:0}
.sc-auction-detail-item dt{margin-bottom:8px;color:#64748b;font-size:14px}
.sc-auction-detail-item dd{margin:0;color:#172033;font-size:17px;font-weight:600;overflow-wrap:anywhere}
.sc-auction-detail-address{grid-column:1/-1}
@media(max-width:600px){.sc-auction-details-grid{grid-template-columns:1fr}}

/* Descrizione immobile */
.sc-auction-description-content{padding:24px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;color:#334155;font-size:16px;line-height:1.8;overflow-wrap:anywhere}
.sc-auction-description-content p{margin:0 0 16px}
.sc-auction-description-content p:last-child{margin-bottom:0}
@media(max-width:600px){.sc-auction-description-content{padding:18px}}

/* Documenti asta */
.sc-auction-documents-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}
.sc-auction-document{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;padding:16px 20px;background:#fff;border:1px solid #cbd5e1;border-radius:10px;color:#176b45;text-decoration:none;box-sizing:border-box}
.sc-auction-document:hover{background:#ecfdf5;border-color:#176b45}
.sc-auction-document-label{font-weight:600;overflow-wrap:anywhere}
.sc-auction-document-extension{flex-shrink:0;padding:5px 9px;background:#e2e8f0;border-radius:5px;color:#334155;font-size:12px;font-weight:700}
@media(max-width:600px){.sc-auction-documents-list{grid-template-columns:1fr}}

/* Mappa immobile */
.sc-auction-location-address{margin:0 0 16px;color:#475569;font-size:16px}
.sc-auction-map{width:100%;height:420px;min-height:300px;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;background:#e2e8f0;z-index:0}
@media(max-width:600px){.sc-auction-map{height:320px}}

/* Finestra di partecipazione all'asta */
.sc-participate-modal[hidden],
.sc-participate-modal [hidden] {
    display: none !important;
}

.sc-participate-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.sc-participate-content {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 65px rgba(0, 0, 0, 0.25);
}

.sc-participate-content h2 {
    margin: 0 40px 20px 0;
    font-size: 26px;
    line-height: 1.3;
}

.sc-participate-content h3 {
    margin: 0 0 20px;
    font-size: 21px;
}

.sc-participate-close {
    position: absolute;
    top: 15px;
    right: 18px;
    border: 0;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 600px) {
    .sc-participate-modal {
        padding: 10px;
    }

    .sc-participate-content {
        padding: 24px 18px;
        max-height: 95vh;
    }

    .sc-participate-content h2 {
        font-size: 22px;
    }
}

/* Campi e pulsanti del modulo di partecipazione */
#sc-participate-form {
    display: grid;
    gap: 10px;
}

#sc-participate-form label {
    margin-top: 8px;
    font-weight: 600;
}

#sc-participate-form input,
#sc-participate-form textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font: inherit;
}

#sc-participate-form input[readonly] {
    background: #f1f5f9;
    color: #475569;
}

.sc-participate-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

#sc-participate-next,
#sc-participate-submit,
.sc-participate-close-confirm {
    padding: 12px 20px;
    border: 0;
    border-radius: 7px;
    background: #16803c;
    color: #fff;
    cursor: pointer;
}

.sc-participate-cancel {
    padding: 12px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}

#sc-participate-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

#sc-participate-error {
    margin-top: 16px;
    padding: 12px;
    border-radius: 7px;
    background: #fef2f2;
    color: #991b1b;
}

@media (max-width: 600px) {
    .sc-participate-form-actions {
        flex-direction: column;
    }

    .sc-participate-form-actions button {
        width: 100%;
    }
}

/* Pulsante verifica valore di mercato */
.sc-auction-action-valuation {
    background: #087f8c;
    color: #fff;
    border-color: #087f8c;
}

.sc-auction-action-valuation:hover,
.sc-auction-action-valuation:focus-visible {
    background: #065f69;
    color: #fff;
    border-color: #065f69;
}

/* Pulsante feed consulenti */
.sc-auction-action-feed {
    background: #16803c;
    border-color: #16803c;
    color: #fff;
    cursor: pointer;
}

.sc-auction-action-feed:hover,
.sc-auction-action-feed:focus-visible {
    background: #11632e;
    border-color: #11632e;
    color: #fff;
}

.sc-auction-action-feed.is-in-feed {
    background: #e8f5eb;
    border-color: #16803c;
    color: #11632e;
}

.sc-auction-action-feed:disabled {
    opacity: 0.65;
    cursor: wait;
}

.sc-auction-action-feed [hidden] {
    display: none !important;
}

/* Termine presentazione offerte su una sola riga */
.sc-auction-summary-deadline .sc-auction-summary-label {
    white-space: nowrap;
    font-size: 13px;
}

.sc-auction-summary-primary {
    background: #ffffff;
    border-color: #e2e8f0;
}

/* Offerta minima in evidenza - 23 settembre 2026 */
.sc-auction-summary-primary .sc-auction-summary-value {
    color: #172033;
    font-size: 22px;
}

.sc-auction-summary-item:nth-child(2) {
    background: #ffffff;
    border: 2px solid #176b45;
}

.sc-auction-summary-item:nth-child(2) .sc-auction-summary-value {
    color: #176b45;
    font-size: 28px;
}
