/* dynamic-forms.css
 * All For Visa - Simple Portal
 *
 * This stylesheet contains the core styling for the dynamic forms
 * and the card UI that represents each form in the list view.
 *
 * @package AFV_Simple_Portal
 * @version 3.1.0
 */

/* ------------------------------------------------------------------
   Base Variables
   ------------------------------------------------------------------ */
:root {
    /* Card colors */
    --card-bg: #ffffff;
    --card-border: #e0e0e0;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    /* Button colors */
    --btn-primary-bg: #0073aa; /* WordPress blue */
    --btn-primary-hover-bg: #005177;
    --btn-primary-text: #ffffff;

    /* Typography */
    --font-base: 16px;
    --font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
        sans-serif;
}

/* ------------------------------------------------------------------
   Global Reset
   ------------------------------------------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
}
body {
    font-family: var(--font-family);
    font-size: var(--font-base);
    line-height: 1.5;
    color: #333;
    margin: 0;
    padding: 0;
}

/* ------------------------------------------------------------------
   Card Component
   ------------------------------------------------------------------ */
.afv-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin: 16px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.afv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
}
.afv-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.afv-card-header .dashicons {
    font-size: 24px;
    color: #5b21b6; /* purple accent */
}
.afv-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e1b4b;
}
.afv-card-body p {
    margin: 0 0 16px 0;
    color: #666;
}
.afv-card-footer {
    text-align: right;
}
.afv-card-footer a {
    display: inline-block;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition:
        background 0.2s ease,
        transform 0.1s ease;
}
.afv-card-footer a:hover {
    background: var(--btn-primary-hover-bg);
    transform: translateY(-1px);
}

/* ------------------------------------------------------------------
   Grid Layout for Card List
   ------------------------------------------------------------------ */
.afvsp-form-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 16px;
}

/* ------------------------------------------------------------------
   Utility Classes
   ------------------------------------------------------------------ */
.text-center {
    text-align: center;
}
.mt-4 {
    margin-top: 1rem;
}
.mb-4 {
    margin-bottom: 1rem;
}

/* ------------------------------------------------------------------
   AFV Hub/Portal Dashboard - Design System Lilás
   ------------------------------------------------------------------ */

/* Grid Layout para Hub Cards */
.afv-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 24px 0;
}

/* Card Base para Hub */
.afv-card {
    background: #ffffff;
    border: 1px solid rgba(167, 139, 250, 0.1);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: block;
}

/* Bordas laterais coloridas */
.afv-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #a78bfa;
    transition: all 0.3s ease;
}

/* Variações de cor das bordas */
.afv-card-blue::before {
    background: #3b82f6;
}

.afv-card-purple::before {
    background: #a78bfa;
}

.afv-card-green::before {
    background: #10b981;
}

.afv-card-yellow::before {
    background: #f59e0b;
}

.afv-card-gray::before {
    background: #6b7280;
}

.afv-card-red::before {
    background: #ef4444;
}

/* Hover effects */
.afv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(167, 139, 250, 0.2);
}

.afv-card:hover::before {
    width: 6px;
}

/* Card Body */
.afv-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

/* Ícone Container */
.afv-card-icon-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

/* Cores dos ícones */
.afv-card-blue .afv-card-icon-container {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.afv-card-purple .afv-card-icon-container {
    background: rgba(167, 139, 250, 0.1);
    color: #a78bfa;
}

.afv-card-green .afv-card-icon-container {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.afv-card-yellow .afv-card-icon-container {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.afv-card-gray .afv-card-icon-container {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.afv-card-red .afv-card-icon-container {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Hover dos ícones */
.afv-card:hover .afv-card-icon-container {
    transform: scale(1.1);
}

/* Ícones */
.afv-card-icon-container .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Título do card */
.afv-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1f1953;
    margin: 0;
    line-height: 1.4;
}

/* Descrição do card */
.afv-card p {
    font-size: 14px;
    color: #7c6fa8;
    margin: 0;
    line-height: 1.5;
}

/* Badge de Status */
.afv-card-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

/* Responsividade */
@media (max-width: 768px) {
    .afv-hub-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 0;
    }
    
    .afv-card {
        padding: 20px;
    }
    
    .afv-card-icon-container {
        width: 50px;
        height: 50px;
    }
    
    .afv-card-icon-container .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
}

/* Animações suaves */
@media (prefers-reduced-motion: no-preference) {
    .afv-card {
        animation: fadeInUp 0.6s ease-out;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Estados de foco para acessibilidade */
.afv-card:focus {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

.afv-card:focus:not(:focus-visible) {
    outline: none;
}

/* Utilitários de cor para ícones */
.afv-bg-blue { background-color: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.afv-bg-purple { background-color: rgba(167, 139, 250, 0.1); color: #a78bfa; }
.afv-bg-green { background-color: rgba(16, 185, 129, 0.1); color: #10b981; }
.afv-bg-yellow { background-color: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.afv-bg-gray { background-color: rgba(107, 114, 128, 0.1); color: #6b7280; }
.afv-bg-red { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; }
