/* ==========================================================================
   ACISA Associados Manager — Public CSS
   ========================================================================== */

/* ------------------------------------------------------------------
   Reset mínimo para componentes do plugin
   ------------------------------------------------------------------ */
.aam-associados-wrapper *,
.aam-form-page *,
.aam-card-associado * {
    box-sizing: border-box;
}

/* ------------------------------------------------------------------
   Grid de associados
   ------------------------------------------------------------------ */
.aam-associados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.aam-associados-lista {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ------------------------------------------------------------------
   Card — layout grid
   ------------------------------------------------------------------ */
.aam-card-associado {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.aam-card-associado:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

/* Card no modo lista */
.aam-card-lista {
    flex-direction: row;
    align-items: flex-start;
}

.aam-card-lista .aam-card-logo {
    flex-shrink: 0;
    width: auto;
}

/* ------------------------------------------------------------------
   Área do logo
   ------------------------------------------------------------------ */
.aam-card-logo {
    position: relative;
    padding: 20px 16px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    border-bottom: 1px solid #f0f0f0;
}

.aam-card-lista .aam-card-logo {
    border-bottom: none;
    border-right: 1px solid #f0f0f0;
    min-height: 120px;
    padding: 16px;
}

.aam-card-logo img {
    width: 150px;
    max-height: 140px;
    object-fit: contain;
    display: block;
}

.aam-card-logo-placeholder {
    width: 64px;
    height: 64px;
    background: #2271b1;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.aam-destaque-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 16px;
}

/* ------------------------------------------------------------------
   Corpo do card
   ------------------------------------------------------------------ */
.aam-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aam-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.aam-card-razao {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

/* Tags de categoria / segmento */
.aam-card-segmento {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
}

.aam-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.aam-tag-secondary {
    background: #f3f4f6;
    color: #374151;
}

.aam-card-descricao {
    margin: 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

.aam-card-cidade {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ------------------------------------------------------------------
   Contatos e links sociais
   ------------------------------------------------------------------ */
.aam-card-contatos,
.aam-card-social {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.aam-contato-link,
.aam-social-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #2271b1;
    text-decoration: none;
    padding: 3px 8px;
    border: 1px solid #dbeafe;
    border-radius: 4px;
    background: #f0f7ff;
    transition: background 0.15s;
    white-space: nowrap;
}

.aam-contato-link:hover,
.aam-social-link:hover {
    background: #dbeafe;
    text-decoration: none;
}

.aam-whatsapp {
    color: #16a34a;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.aam-whatsapp:hover {
    background: #bbf7d0;
}

/* ------------------------------------------------------------------
   Mensagem de lista vazia
   ------------------------------------------------------------------ */
.aam-empty {
    color: #6b7280;
    font-style: italic;
    padding: 24px 0;
    text-align: center;
}

/* ------------------------------------------------------------------
   Wrapper geral das páginas públicas do plugin
   (garante centralização independente do tema ativo)
   ------------------------------------------------------------------ */
.aam-page-wrapper {
    width: 100%;
    padding: 40px 16px;
    box-sizing: border-box;
}

/* ------------------------------------------------------------------
   Página do formulário público
   ------------------------------------------------------------------ */
.aam-form-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 16px;
}

.aam-form-header {
    margin-bottom: 28px;
}

.aam-form-header h1 {
    margin-bottom: 8px;
}

.aam-form-notice {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 12px;
}

/* ------------------------------------------------------------------
   Fieldsets do formulário público
   ------------------------------------------------------------------ */
.aam-fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.aam-fieldset legend {
    font-weight: 700;
    font-size: 15px;
    color: #1d2327;
    padding: 0 8px;
}

.aam-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 640px) {
    .aam-grid-2 {
        grid-template-columns: 1fr;
    }
}

.aam-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.aam-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.aam-field label .req {
    color: #ef4444;
    margin-left: 2px;
}

.aam-field input,
.aam-field select,
.aam-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s;
}

.aam-field input:focus,
.aam-field select:focus,
.aam-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.aam-field textarea {
    resize: vertical;
    min-height: 90px;
}

.aam-field-help {
    font-size: 12px;
    color: #6b7280;
    margin: 2px 0 0;
}

/* ------------------------------------------------------------------
   Honeypot (invisível para humanos)
   ------------------------------------------------------------------ */
.aam-hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
    tab-index: -1;
}

/* ------------------------------------------------------------------
   Submit do formulário público
   ------------------------------------------------------------------ */
.aam-form-submit {
    margin-top: 8px;
    text-align: center;
}

.aam-form-disclaimer {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.6;
}

.aam-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    border: 1px solid #2271b1;
    background: #fff;
    color: #2271b1;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.aam-btn-primary {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.aam-btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

.aam-btn:hover {
    background: #f0f7ff;
}

/* ------------------------------------------------------------------
   Página de sucesso — card centralizado
   ------------------------------------------------------------------ */
.aam-sucesso-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 16px;
    min-height: 60vh;
}

.aam-sucesso-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    padding: 48px 40px 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
}

@media (max-width: 560px) {
    .aam-sucesso-card {
        padding: 36px 20px 28px;
    }
}

.aam-sucesso-check {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.aam-sucesso-check svg {
    width: 72px;
    height: 72px;
}

.aam-sucesso-titulo {
    font-size: 24px;
    font-weight: 700;
    color: #065f46;
    margin: 0 0 12px;
    line-height: 1.3;
}

.aam-sucesso-subtitulo {
    font-size: 15px;
    color: #374151;
    line-height: 1.7;
    margin: 0 0 28px;
}

/* Steps */
.aam-sucesso-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.aam-sucesso-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.aam-sucesso-step.aam-step-done {
    color: #16a34a;
}

.aam-sucesso-step.aam-step-done .aam-step-num {
    background: #16a34a;
    color: #fff;
}

.aam-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #374151;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.aam-sucesso-step-sep {
    color: #d1d5db;
    font-size: 18px;
    line-height: 1;
}

.aam-sucesso-obs {
    font-size: 14px;
    color: #9ca3af;
    margin: 0 0 28px;
}

/* ------------------------------------------------------------------
   Página de erro (formulário inválido / token expirado)
   ------------------------------------------------------------------ */
.aam-error-box {
    max-width: 600px;
    margin: 60px auto;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
}

.aam-error-box h2 {
    color: #b91c1c;
    margin-bottom: 12px;
}

.aam-error-box p {
    color: #374151;
    font-size: 15px;
    line-height: 1.6;
}
