/* ============================================
   GrowCommerce - Support Page
   ============================================ */

/* Spinning animation for loader */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Search */
.support-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    max-width: 600px;
    margin: 2rem auto 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.support-search svg {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    flex-shrink: 0;
}

.support-search-input {
    border: none;
    background: none;
    outline: none;
    font-size: 1rem;
    width: 100%;
    font-family: inherit;
    color: #1f2937;
}

.support-search-input::placeholder {
    color: #9ca3af;
}

/* Quick Help */
.quick-help {
    padding: 4rem 0;
    margin-top: -1.5rem;
}

.help-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .help-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .help-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.help-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid #f3f4f6;
    transition: all 0.3s;
    text-align: center;
}

.help-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.1);
}

.help-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.help-card-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.help-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.help-card p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.help-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #667eea;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: gap 0.2s;
}

.help-card-link:hover {
    gap: 0.625rem;
}

.help-card-link svg {
    width: 16px;
    height: 16px;
}

/* FAQ */
.faq-section {
    padding: 4rem 0;
    background: #f9fafb;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: #e5e7eb;
}

.faq-item.open {
    border-color: #667eea;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
}

.faq-question h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.faq-chevron {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    color: #667eea;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 1.5rem 1.25rem;
    color: #6b7280;
    line-height: 1.7;
    font-size: 0.9375rem;
}

/* Contact Section */
.contact-section {
    padding: 5rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr 1.5fr;
    }
}

.contact-info h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.75rem;
}

.contact-info > p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-method-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-method-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.contact-method h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.125rem;
}

.contact-method a,
.contact-method p {
    color: #6b7280;
    font-size: 0.9375rem;
}

.contact-method a:hover {
    color: #667eea;
}

/* Contact Form */
.contact-form-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

@media (max-width: 640px) {
    .contact-form-card {
        padding: 1.5rem;
    }
}

/* Form validation styles */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.field-error {
    display: block;
    color: #dc2626;
    font-size: 12px;
    margin-top: 5px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-input.error,
.form-select.error {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

.form-input.error:focus,
.form-select.error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* Character counter */
.character-counter {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
    text-align: right;
}

.char-count {
    font-weight: 500;
    transition: color 0.3s ease;
}

.character-counter.over-limit .char-count {
    color: #dc2626;
    font-weight: 600;
}

/* URL validation feedback */
.form-input.valid-url {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
}

.form-input.invalid-url {
    border-color: #f59e0b !important;
    background-color: #fffbeb !important;
}

/* Form message enhancements */
.form-message {
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.form-message.success {
    background: #10b981;
    color: white;
    border: 1px solid #059669;
    animation: successPulse 0.6s ease-out;
}

.form-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    animation: errorShake 0.6s ease-out;
}

/* Ticket info display */
.ticket-info {
    background: #f0fdf4;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.ticket-id-display {
    font-size: 16px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 8px;
}

.ticket-note {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* Email confirmation */
.email-confirmation {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 13px;
    color: #166534;
    font-weight: 500;
}

/* Enhanced button styles */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary svg {
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: translateX(2px);
}

/* Loading spinner for button */
.btn-primary i[data-lucide="loader-2"] {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success and error animations */
@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Mobile responsive enhancements */
@media (max-width: 768px) {
    .field-error {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .character-counter {
        font-size: 11px;
    }
    
    .ticket-info {
        padding: 12px;
    }
    
    .ticket-id-display {
        font-size: 14px;
    }
    
    .form-message {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Focus indicators */
.form-input:focus,
.form-select:focus,
textarea.form-input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.btn-primary:focus,
.btn-primary:hover {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Enhanced input states */
.form-input:invalid {
    border-color: #dc2626;
}

.form-input:valid {
    border-color: #10b981;
}

/* Textarea enhancements */
textarea.form-input {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

/* Selection improvements */
.form-select option {
    padding: 12px 16px;
    background: white;
}

.form-select:required:invalid {
    color: #6b7280;
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
    .form-input,
    .form-select,
    .form-input:focus,
    .form-select:focus {
        border-width: 2px;
    }
    
    .field-error {
        border: 2px solid #dc2626;
        background: #000;
        color: #fff;
    }
}
