/**
 * Animation Addons AppSumo Connect - Styles
 * Modern, responsive styling inspired by TailwindCSS
 */

/* Reset and Base Styles */
.animationaddons-signup-form,
.animationaddons-login-form {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #374151;
    box-sizing: border-box;
}

.animationaddons-signup-form *,
.animationaddons-login-form *,
.animationaddons-signup-form *::before,
.animationaddons-login-form *::before,
.animationaddons-signup-form *::after,
.animationaddons-login-form *::after {
    box-sizing: border-box;
}

/* Form Container */
.animationaddons-form-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
}

/* Form Title */
.animationaddons-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin: 0 0 1.5rem 0;
    line-height: 1.25;
}

/* Form Groups */
.animationaddons-form-group {
    margin-bottom: 1.25rem;
}

.animationaddons-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Labels */
.animationaddons-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.required {
    color: #dc2626;
    margin-left: 0.125rem;
}

/* Input Fields */
.animationaddons-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #111827;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.15s ease-in-out;
    outline: none;
}

.animationaddons-form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.animationaddons-form-input:invalid {
    border-color: #dc2626;
}

.animationaddons-form-input:invalid:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Help Text */
.animationaddons-form-help {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    line-height: 1.25;
}

/* Checkbox */
.animationaddons-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.25;
}

.animationaddons-checkbox {
    width: 1rem;
    height: 1rem;
    margin: 0;
    cursor: pointer;
    accent-color: #3b82f6;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.animationaddons-checkbox-text {
    color: #374151;
    line-height: 1.25;
}

/* Buttons */
.animationaddons-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    outline: none;
    position: relative;
    overflow: hidden;
}

.animationaddons-btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.animationaddons-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.animationaddons-btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.animationaddons-btn-primary:hover:not(:disabled) {
    background-color: #2563eb;
    border-color: #2563eb;
}

.animationaddons-btn-primary:active:not(:disabled) {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.animationaddons-btn-full {
    width: 100%;
}

/* Button Spinner */
.animationaddons-btn-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.animationaddons-spinner {
    width: 1rem;
    height: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Links */
.animationaddons-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease-in-out;
}

.animationaddons-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.animationaddons-link-primary {
    color: #3b82f6;
}

.animationaddons-link-secondary {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Form Messages */
.animationaddons-form-message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    margin-top: 1rem;
}

.animationaddons-form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.animationaddons-form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Form Footer */
.animationaddons-form-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.animationaddons-form-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.25;
}

/* Responsive Design */
@media (max-width: 640px) {
    .animationaddons-form-container {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 0.5rem;
    }
    
    .animationaddons-form-title {
        font-size: 1.25rem;
    }
    
    .animationaddons-form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Loading State */
.animationaddons-form.loading .animationaddons-btn-text {
    opacity: 0;
}

.animationaddons-form.loading .animationaddons-btn-spinner {
    display: inline-flex;
}

/* Focus Management */
.animationaddons-form-input:focus,
.animationaddons-checkbox:focus,
.animationaddons-btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .animationaddons-form-input {
        border-width: 2px;
    }
    
    .animationaddons-btn {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .animationaddons-form-input,
    .animationaddons-btn,
    .animationaddons-link {
        transition: none;
    }
    
    .animationaddons-spinner {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .animationaddons-signup-form,
    .animationaddons-login-form {
        display: none;
    }
}
