/* Forms Center - Modern Mobile-Friendly Styles */

.wcvi-forms-center {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

/* Container */
.wcvi-forms-center {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.wcvi-forms-center-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.wcvi-forms-center-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.2;
}

.wcvi-forms-center-description {
    font-size: 1.125rem;
    color: var(--secondary-color);
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Sections */
.wcvi-forms-section {
    margin-bottom: var(--spacing-2xl);
}

.wcvi-section-header {
    margin-bottom: var(--spacing-lg);
}

.wcvi-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 var(--spacing-sm) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.wcvi-section-icon {
    font-size: 1.25rem;
}

.wcvi-section-description {
    color: var(--secondary-color);
    margin: 0;
    font-size: 0.95rem;
}

/* Grid Layout */
.wcvi-forms-grid {
    display: grid;
    gap: var(--spacing-lg);
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Responsive grid adjustments */
.wcvi-forms-center[data-columns="1"] .wcvi-forms-grid {
    grid-template-columns: 1fr;
}

.wcvi-forms-center[data-columns="2"] .wcvi-forms-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.wcvi-forms-center[data-columns="4"] .wcvi-forms-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Form Cards */
.wcvi-form-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.wcvi-form-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.wcvi-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wcvi-form-card:hover::before {
    opacity: 1;
}

/* Card Header */
.wcvi-form-card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}

.wcvi-form-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.4;
}

.wcvi-form-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

/* Badges */
.wcvi-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

.wcvi-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.wcvi-form-card:hover .wcvi-badge::after {
    left: 100%;
}

.wcvi-badge-recommended {
    background: #fef3c7;
    color: #92400e;
}

.wcvi-badge-assigned {
    background: #dbeafe;
    color: #1e40af;
}

.wcvi-badge-submitted {
    background: #d1fae5;
    color: #065f46;
}

/* Card Body */
.wcvi-form-card-body {
    padding: var(--spacing-lg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.wcvi-form-description {
    color: var(--secondary-color);
    line-height: 1.6;
    margin: 0 0 var(--spacing-md) 0;
    flex-grow: 1;
}

.wcvi-submission-info,
.wcvi-assignment-info {
    margin-top: auto;
    padding-top: var(--spacing-sm);
}

.wcvi-submission-date,
.wcvi-assignment-date {
    color: #6b7280;
    font-size: 0.875rem;
    font-style: italic;
}

/* Card Footer */
.wcvi-form-card-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}

.wcvi-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}

/* Buttons */
.wcvi-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.wcvi-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.wcvi-btn:active {
    transform: translateY(0);
}

.wcvi-btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.5);
}

/* Button Variants */
.wcvi-btn-primary {
    background: var(--primary-color);
    color: white;
}

.wcvi-btn-primary:hover {
    background: var(--primary-hover);
    color: white;
}

.wcvi-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.wcvi-btn-secondary:hover {
    background: #e2e8f0;
    color: #334155;
}

.wcvi-btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.wcvi-btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.wcvi-btn-admin {
    background: #fbbf24;
    color: #92400e;
    border-color: #f59e0b;
    padding: 0.5rem;
    min-width: auto;
}

.wcvi-btn-admin:hover {
    background: #f59e0b;
    color: #78350f;
}

/* Button Sizes */
.wcvi-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.wcvi-btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

/* Button Icons */
.wcvi-btn-icon {
    font-size: 1rem;
}

/* Section-specific styling */
.wcvi-recommended-section .wcvi-form-card {
    border-left: 4px solid #fbbf24;
}

.wcvi-assigned-section .wcvi-form-card {
    border-left: 4px solid var(--primary-color);
}

.wcvi-submitted-section .wcvi-form-card {
    border-left: 4px solid var(--success-color);
}

/* Empty State */
.wcvi-forms-center-empty {
    text-align: center;
    padding: var(--spacing-2xl);
}

.wcvi-empty-state {
    padding: var(--spacing-2xl);
    text-align: center;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: var(--border-radius);
    max-width: 400px;
    margin: 0 auto;
}

.wcvi-empty-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.wcvi-empty-state h3 {
    color: #475569;
    margin: 0 0 var(--spacing-sm) 0;
}

.wcvi-empty-state p {
    color: #64748b;
    margin: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Error States */
.wcvi-forms-center-error {
    padding: var(--spacing-xl);
    text-align: center;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--border-radius);
    margin: var(--spacing-lg) 0;
}

.wcvi-error-message {
    max-width: 400px;
    margin: 0 auto;
}

.wcvi-error-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--spacing-md);
}

.wcvi-error-message h3 {
    color: #dc2626;
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 1.25rem;
}

.wcvi-error-message p {
    color: #7f1d1d;
    margin: 0 0 var(--spacing-lg) 0;
}

/* Loading States */
.wcvi-forms-center-loading {
    text-align: center;
    padding: var(--spacing-2xl);
}

.wcvi-loading-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: wcvi-spin 1s linear infinite;
}

@keyframes wcvi-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Submission Notice */
.wcvi-submission-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: #f0f9ff;
    color: var(--success-color);
    border: 1px solid #bae6fd;
    border-radius: var(--border-radius);
    font-weight: 500;
    gap: var(--spacing-xs);
    opacity: 0.8;
}

.wcvi-submission-notice .wcvi-btn-icon {
    font-size: 1rem;
}

/* Dynamic submission updates */
.wcvi-card-updated {
    transform: scale(1.02);
    box-shadow: 0 8px 25px -8px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.wcvi-submission-notice.wcvi-just-submitted {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    animation: wcvi-submit-success 0.6s ease;
}

.wcvi-badge-new {
    animation: wcvi-badge-appear 0.5s ease;
}

@keyframes wcvi-submit-success {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes wcvi-badge-appear {
    0% {
        transform: translateY(-10px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading state for submit button */
.wcvi-btn-submit.wcvi-loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.wcvi-btn-submit.wcvi-loading .wcvi-btn-icon {
    animation: wcvi-spin 1s linear infinite;
}

/* Enhanced submission notice styling */
.wcvi-submission-notice {
    transition: all 0.3s ease;
}

.wcvi-submission-notice:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

/* Notifications */
.wcvi-notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.wcvi-notification {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    background: white;
    border-left: 4px solid var(--primary-color);
    animation: wcvi-notification-slide-in 0.3s ease;
}

.wcvi-notification-success {
    border-left-color: var(--success-color);
    background: #f0fdf4;
}

.wcvi-notification-error {
    border-left-color: var(--danger-color);
    background: #fef2f2;
}

.wcvi-notification-warning {
    border-left-color: var(--warning-color);
    background: #fffbeb;
}

.wcvi-notification-info {
    border-left-color: var(--primary-color);
    background: #f0f9ff;
}

.wcvi-notification-icon {
    font-size: 1.2rem;
    margin-right: var(--spacing-sm);
}

.wcvi-notification-message {
    flex: 1;
    font-weight: 500;
    color: #374151;
}

.wcvi-notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    margin-left: var(--spacing-sm);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.wcvi-notification-close:hover {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

@keyframes wcvi-notification-slide-in {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Section transitions */
.wcvi-forms-section {
    transition: all 0.3s ease;
}

.wcvi-forms-section.wcvi-section-empty {
    opacity: 0.5;
    transform: scale(0.98);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wcvi-forms-center {
        padding: var(--spacing-md);
    }
    
    .wcvi-forms-center-title {
        font-size: 1.875rem;
    }
    
    .wcvi-forms-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .wcvi-form-card-header,
    .wcvi-form-card-body,
    .wcvi-form-card-footer {
        padding: var(--spacing-md);
    }
    
    .wcvi-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wcvi-btn {
        justify-content: center;
    }
    
    .wcvi-section-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .wcvi-forms-center {
        padding: var(--spacing-sm);
    }
    
    .wcvi-forms-center-title {
        font-size: 1.5rem;
    }
    
    .wcvi-forms-center-description {
        font-size: 1rem;
    }
    
    .wcvi-form-card-header,
    .wcvi-form-card-body,
    .wcvi-form-card-footer {
        padding: var(--spacing-sm);
    }
    
    .wcvi-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .wcvi-section-title {
        font-size: 1.125rem;
    }
    
    .wcvi-section-icon {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .wcvi-forms-center {
        box-shadow: none;
    }
    
    .wcvi-form-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .wcvi-btn {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .wcvi-form-card {
        border-color: #000;
    }
    
    .wcvi-btn-primary {
        background: #000;
        color: #fff;
    }
    
    .wcvi-btn-secondary {
        background: #fff;
        color: #000;
        border-color: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .wcvi-form-card,
    .wcvi-btn {
        transition: none;
    }
    
    .wcvi-form-card:hover {
        transform: none;
    }
    
    .wcvi-btn:hover {
        transform: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wcvi-forms-center {
        --border-color: #374151;
        --secondary-color: #9ca3af;
    }
    
    .wcvi-form-card {
        background: #1f2937;
        border-color: var(--border-color);
        color: #f9fafb;
    }
    
    .wcvi-form-card-header,
    .wcvi-form-card-footer {
        background: #111827;
    }
    
    .wcvi-form-title {
        color: #f9fafb;
    }
    
    .wcvi-section-title {
        color: #f9fafb;
    }
    
    .wcvi-forms-center-title {
        color: #f9fafb;
    }
    
    .wcvi-btn-secondary {
        background: #374151;
        color: #d1d5db;
        border-color: #4b5563;
    }
    
    .wcvi-btn-secondary:hover {
        background: #4b5563;
        color: #f3f4f6;
    }
}

/* Forms Center JavaScript enhancements */
.wcvi-card-hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.wcvi-btn-clicked {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.wcvi-card-visible {
    opacity: 1;
    transform: translateY(0);
}

.wcvi-animations-enabled .wcvi-form-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.wcvi-animations-enabled .wcvi-card-loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Progress indicators */
.wcvi-section-progress {
    margin-top: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.wcvi-progress-bar {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.wcvi-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #34d399);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.wcvi-progress-text {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 500;
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wcvi-card-hover {
        transform: none;
    }
    
    .wcvi-section-progress {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .wcvi-progress-bar {
        width: 100%;
    }
}
