/**
 * Global CSS - Site-wide styles and components
 * Used across all pages for consistency
 */

/* Global Form Styles */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.form-header {
    text-align: center;
    margin-bottom: 24px;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 0.9rem;
    color: #64748b;
}

/* Form Fields */
.form-field {
    margin-bottom: 20px;
}

.form-field-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-label-inline {
    width: 35%;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    flex-shrink: 0;
}

.form-input-wrapper {
    width: 65%;
}

.form-input-wrapper-full {
    width: 100%;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(249, 25, 66, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form Grid */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Event Type Selection */
.event-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.event-type-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.event-type-card:hover {
    border-color: var(--primary-color);
    background: rgba(249, 25, 66, 0.05);
    transform: translateY(-2px);
}

.event-type-card.selected {
    border-color: var(--primary-color);
    background: rgba(249, 25, 66, 0.1);
    box-shadow: 0 4px 12px rgba(249, 25, 66, 0.2);
}

.event-type-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    display: block;
}

.event-type-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

/* Global Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #d5163a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 25, 66, 0.3);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #4b5563;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.btn-full {
    width: 100%;
}

.btn-loading {
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Form Steps */
.form-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.form-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    margin: 0 4px;
}

.form-step.active {
    background: var(--primary-color);
    color: white;
}

.form-step.completed {
    background: #10b981;
    color: white;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.form-actions-center {
    justify-content: center;
}

.form-actions-end {
    justify-content: flex-end;
}

/* Error States */
.form-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 4px;
}

.form-input.error, .form-select.error, .form-textarea.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-input.error:focus, .form-select.error:focus, .form-textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Success States */
.form-success {
    color: #10b981;
    font-size: 0.8rem;
    margin-top: 4px;
}

.form-input.success, .form-select.success, .form-textarea.success {
    border-color: #10b981;
    background: #f0fdf4;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.toast.info {
    background: var(--primary-color);
}

.toast.warning {
    background: #f59e0b;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
        border-radius: 12px;
    }
    
    .form-field-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .form-label-inline {
        width: 100%;
    }
    
    .form-input-wrapper {
        width: 100%;
    }
    
    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .event-type-grid {
        gap: 8px;
    }
    
    .event-type-card {
        padding: 12px 8px;
    }
    
    .event-type-icon {
        width: 32px;
        height: 32px;
    }
    
    .event-type-title {
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 0.9rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 16px;
        margin: 10px;
    }
    
    .event-type-icon {
        width: 28px;
        height: 28px;
    }
    
    .event-type-title {
        font-size: 0.75rem;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}