/* Smart AI Tools Index - Additional Styles */
/* Supplement to main styles in index.html */

/* Form Enhancements */
.form-group {
    position: relative;
}

.field-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--electric-blue);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}

.form-group input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Loading States */
.btn.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success/Error Messages */
.success-message,
.error-message {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Upgrade Prompt */
.upgrade-prompt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 300px;
    border: 2px solid var(--electric-blue);
    animation: slideInRight 0.5s ease-out;
}

.upgrade-prompt h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.upgrade-prompt p {
    margin-bottom: 1rem;
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.upgrade-prompt .btn {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.75rem;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Feature Modal */
.feature-modal .modal-content {
    max-width: 500px;
}

.feature-modal .feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.feature-modal .feature-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.feature-modal .feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--electric-blue);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Pricing Toggle */
.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.pricing-toggle input[type="checkbox"] {
    appearance: none;
    width: 50px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pricing-toggle input[type="checkbox"]:checked {
    background: var(--electric-blue);
}

.pricing-toggle input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.pricing-toggle input[type="checkbox"]:checked::before {
    transform: translateX(26px);
}

.pricing-toggle label {
    margin: 0 1rem;
    font-weight: 600;
    cursor: pointer;
}

.pricing-toggle label.active {
    color: var(--electric-blue);
}

/* Savings Badge */
.savings-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--success-green);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .upgrade-prompt {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .pricing-toggle {
        flex-direction: column;
        gap: 1rem;
    }
    
    .feature-modal .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .upgrade-prompt {
        background: var(--primary-dark);
        border-color: var(--electric-blue);
    }
    
    .upgrade-prompt h4 {
        color: white;
    }
    
    .upgrade-prompt p {
        color: #ccc;
    }
    
    .success-message {
        background: #1e4620;
        color: #a7d4a9;
        border-color: #2d5a2f;
    }
    
    .error-message {
        background: #4a1a1a;
        color: #f5a3a3;
        border-color: #6a2525;
    }
}

/* Accessibility Improvements */
.btn:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--electric-blue);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #000;
    }
    
    .btn-secondary {
        background: transparent;
        border: 2px solid #000;
        color: #000;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .modal,
    .upgrade-prompt,
    header,
    footer {
        display: none;
    }
    
    .pricing-card {
        page-break-inside: avoid;
    }
    
    .btn {
        background: transparent !important;
        border: 1px solid #000 !important;
        color: #000 !important;
    }
}

/* Performance Optimizations */
.pricing-card,
.content-card {
    contain: layout;
    will-change: transform;
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}
/*

.modal[aria-hidden="false"] {
    display: block;
}

.modal[aria-hidden="true"] {
    display: none;
}
*/
/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--electric-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0066CC;
}