/**
 * AutoVendo - Estilos custom para layouts public y client
 */

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

/* Logos */
.logo-auth {
    image-rendering: auto;
    max-width: 200px;
}

.logo-header-client {
    image-rendering: auto;
    max-width: 340px;
}

.logo-header-public {
    image-rendering: auto;
    max-width: 280px;
}

.logo-footer-public {
    image-rendering: auto;
    max-width: 300px;
}

/* ========== Footer público mejorado ========== */
.footer-public {
    color: #f8fafc;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.footer-public-desc {
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.footer-public-heading {
    letter-spacing: 0.12em;
}

.footer-link {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-link:hover {
    color: #ffffff;
}

.footer-public-contact .footer-link:hover,
.footer-public-links .footer-link:hover {
    color: #dc2626;
}

.footer-social-link {
    font-size: 1.125rem;
}

.footer-public-bottom .footer-link:hover {
    color: #dc2626;
}

/* Botón primario (client) */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #dc2626;
    color: white !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2);
}

.btn-primary:hover {
    background-color: #b91c1c;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Botón primario (public - con gradiente) */
.layout-public .btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 14px -2px rgba(220, 38, 38, 0.4);
}

.layout-public .btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow: 0 8px 25px -5px rgba(220, 38, 38, 0.35);
    transform: translateY(-1px);
}

.layout-public .btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.layout-public .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Input field */
.input-field {
    width: 100%;
    border-radius: 0.75rem;
    border: 2px solid #e2e8f0;
    background-color: #ffffff;
    padding: 0.75rem 1rem;
    color: #1e293b;
    font-size: 1rem;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.input-field::placeholder {
    color: #94a3b8;
}

.input-field:hover:not(:focus):not(:disabled) {
    border-color: #cbd5e1;
    background-color: #fafafa;
}

.input-field:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.input-field:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

select.input-field {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    padding-right: 2.5rem;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
}

select.input-field:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23dc2626'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

textarea.input-field {
    min-height: 120px;
    resize: vertical;
}

/* Input file */
.input-file {
    width: 100%;
    border-radius: 0.75rem;
    border: 2px dashed #e2e8f0;
    background-color: #f8fafc;
    padding: 0.75rem 1rem;
    color: #475569;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.input-file:hover {
    border-color: #cbd5e1;
    background-color: rgba(241, 245, 249, 0.5);
}

.input-file:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.input-file::file-selector-button {
    margin-right: 1rem;
    border-radius: 0.5rem;
    border: 0;
    background-color: #dc2626;
    padding: 0.5rem 1rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
}

/* Card elevated (solo public) */
.card-elevated {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px -2px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
}

.card-elevated:hover {
    box-shadow: 0 20px 50px -15px rgb(10 10 10 / 0.18), 0 8px 20px -8px rgb(0 0 0 / 0.1);
    border-color: rgba(226, 232, 240, 0.8);
}

/* Nav link public */
.nav-link-public {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    color: #ffffff !important;
}

.nav-link-public:hover {
    background-color: rgba(220, 38, 38, 0.1);
    color: #dc2626 !important;
}

.nav-link-public i,
.nav-link-public .fa {
    color: #ffffff !important;
}

.nav-link-public:hover i,
.nav-link-public:hover .fa {
    color: #dc2626 !important;
}

header .nav-link-public,
header a.text-white,
header button.text-white {
    color: #ffffff !important;
}

header .nav-link-public:hover,
header a.text-white:hover,
header button.text-white:hover {
    color: #dc2626 !important;
}

header .nav-link-public i,
header .nav-link-public .fa,
header a.text-white i,
header button.text-white i {
    color: #ffffff !important;
}

header .nav-link-public:hover i,
header .nav-link-public:hover .fa,
header a.text-white:hover i,
header button.text-white:hover i {
    color: #dc2626 !important;
}

/* ========== Zona cliente (Mi cuenta) ========== */
.layout-client .client-nav-link {
    transition: color 0.2s, background 0.2s;
}
.layout-client main {
    min-height: calc(100vh - 6rem);
}
.layout-client .client-alert {
    animation: clientAlertIn 0.3s ease-out;
}
@keyframes clientAlertIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Cards y tablas en dashboard cliente */
.layout-client .shadow-soft {
    box-shadow: 0 4px 20px -2px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
    transition: box-shadow 0.3s ease, border-color 0.2s ease;
}
.layout-client .shadow-soft:hover {
    box-shadow: 0 12px 32px -8px rgb(0 0 0 / 0.1), 0 4px 12px -4px rgb(0 0 0 / 0.06);
}
.layout-client .rounded-2xl {
    border-radius: 1rem;
}
.layout-client table thead th {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
.layout-client .font-display {
    letter-spacing: -0.02em;
}
/* Dashboard cliente: card vacía mejorada */
.layout-client .client-empty-card {
    border: 2px dashed #e2e8f0;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.layout-client .client-empty-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc !important;
}
.layout-client .client-empty-card .empty-icon-wrap {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
/* Dashboard cliente: tabla mejorada */
.layout-client main table tbody tr {
    transition: background-color 0.15s ease;
}
.layout-client main table tbody tr:hover {
    background-color: rgba(248, 250, 252, 0.9) !important;
}

/* Dashboard cliente: tarjetas móvil y paginación */
.layout-client .client-dashboard-card:first-child {
    padding-top: 1rem;
}
.layout-client .client-dashboard-pagination nav[role="navigation"] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
}
.layout-client .client-dashboard-pagination nav a,
.layout-client .client-dashboard-pagination nav [aria-current="page"] span,
.layout-client .client-dashboard-pagination nav [aria-disabled="true"] span {
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.layout-client .client-dashboard-pagination nav a:hover {
    background-color: rgba(10, 10, 10, 0.06) !important;
    border-color: #e2e8f0 !important;
    color: #0a0a0a;
}
.layout-client .client-dashboard-pagination nav [aria-current="page"] span {
    background-color: #0a0a0a !important;
    border-color: #0a0a0a !important;
    color: white !important;
}
.layout-client .client-dashboard-pagination nav [aria-disabled="true"] span {
    opacity: 0.5;
    cursor: not-allowed;
}
.layout-client .client-dashboard-pagination .text-gray-700 {
    color: #334155 !important;
}

/* ========== Impresión / PDF ========== */
.print-only {
    display: none;
}

@media print {
    header,
    footer,
    .no-print,
    a[href^="https://wa.me"],
    #back-to-top,
    a[href*="whatsapp"],
    .fixed {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    body {
        background: white;
    }

    main {
        padding-top: 0 !important;
    }

    .container {
        max-width: 100%;
    }

    article {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }

    /* Evitar cortes de página dentro de la ficha */
    article {
        break-inside: avoid;
    }

    /* Mejor contraste para impresión */
    .text-accent {
        color: #b91c1c !important;
    }
}

/* Iframe mapa (evitar estilos inline en vistas) */
.embed-map-iframe {
    border: 0;
    min-height: 320px;
}
