/* Child Theme - Custom CSS File for Buyers to Modify */

/* ══════════════════════════════════════════════════════════════
   IdeaCasa – Agent Contact Card  |  Griglia lista agenti
   ══════════════════════════════════════════════════════════════ */

/* ── Griglia nella pagina lista agenti ── */
.agents-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0;
    padding: 0;
}
.agents-card-grid .agent-card-col {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 260px;
    box-sizing: border-box;
}
@media (max-width: 980px) {
    .agents-card-grid .agent-card-col { flex: 0 0 calc(50% - 12px); }
}
@media (max-width: 600px) {
    .agents-card-grid .agent-card-col { flex: 0 0 100%; }
}
.agents-card-pagination { margin-top: 32px; }

/* ── Card contenitore ── */
.agent-contact-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .10);
    padding: 18px 16px 16px;
    font-family: inherit;
    box-sizing: border-box;
}

/* ── Intestazione: foto + nome ── */
.agent-contact-card .acc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.agent-contact-card .acc-photo,
.agent-contact-card .acc-photo a {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    text-decoration: none;
}
.agent-contact-card .acc-photo img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.agent-contact-card .acc-photo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4caf50;
    font-size: 22px;
}
.agent-contact-card .acc-identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.agent-contact-card .acc-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.agent-contact-card .acc-name i {
    color: #888;
    font-size: 13px;
    flex-shrink: 0;
}
.agent-contact-card .acc-listings-link {
    font-size: 13px;
    color: #4caf50;
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
}
.agent-contact-card .acc-listings-link:hover {
    color: #388e3c;
    text-decoration: underline;
}

/* ── Campi form ── */
.agent-contact-card .acc-form input[type="email"],
.agent-contact-card .acc-form input[type="tel"],
.agent-contact-card .acc-form select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #444;
    background: #fff;
    margin-bottom: 10px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}
.agent-contact-card .acc-form input[type="email"]:focus,
.agent-contact-card .acc-form input[type="tel"]:focus,
.agent-contact-card .acc-form select:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, .12);
}
.agent-contact-card .acc-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 28px !important;
    cursor: pointer;
}

/* ── Testo GDPR ── */
.agent-contact-card .acc-gdpr {
    font-size: 11.5px;
    color: #888;
    margin: 0 0 12px;
    line-height: 1.5;
}
.agent-contact-card .acc-gdpr a { color: #4caf50; text-decoration: none; }
.agent-contact-card .acc-gdpr a:hover { text-decoration: underline; }

/* ── Pulsanti ── */
.agent-contact-card .acc-buttons-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.agent-contact-card .acc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    white-space: nowrap;
    box-sizing: border-box;
    border: 2px solid transparent;
    line-height: 1;
    font-family: inherit;
}
.agent-contact-card .acc-btn-send {
    background: #4caf50;
    color: #fff !important;
    border-color: #4caf50;
    flex: 1;
}
.agent-contact-card .acc-btn-send:hover,
.agent-contact-card .acc-btn-send:focus  { background: #388e3c; border-color: #388e3c; color: #fff !important; }
.agent-contact-card .acc-btn-send:disabled { opacity: .6; cursor: wait; }

.agent-contact-card .acc-btn-call {
    background: #fff;
    color: #4caf50 !important;
    border-color: #4caf50;
    flex: 1;
}
.agent-contact-card .acc-btn-call:hover,
.agent-contact-card .acc-btn-call:focus { background: #f1f8e9; color: #388e3c !important; }

.agent-contact-card .acc-btn-whatsapp {
    display: flex;
    width: 100%;
    background: #fff;
    color: #25d366 !important;
    border-color: #25d366;
    justify-content: center;
    margin-top: 2px;
}
.agent-contact-card .acc-btn-whatsapp i { font-size: 16px; }
.agent-contact-card .acc-btn-whatsapp:hover,
.agent-contact-card .acc-btn-whatsapp:focus { background: #e8faf0; color: #1da851 !important; }

/* ── Loader spinner ── */
.agent-contact-card .acc-loader { text-align: center; padding: 6px 0; }
.agent-contact-card .acc-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #4caf50;
    border-radius: 50%;
    animation: acc-spin .7s linear infinite;
}
@keyframes acc-spin { to { transform: rotate(360deg); } }

/* ── Messaggi risposta ── */
.agent-contact-card .acc-response {
    margin-top: 8px;
    font-size: 12px;
    padding: 7px 10px;
    border-radius: 5px;
    line-height: 1.4;
}
.agent-contact-card .acc-response.acc-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.agent-contact-card .acc-response.acc-error   { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
