/**
 * Emergency-Optimized Form Design
 * Designed for quick reporting in stressful situations
 * Following government form design standards
 */

/* Emergency Form Container */
.emergency-form-wrapper {
    background: white;
    border: 2px solid var(--gov-blue-60);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin: 2rem 0;
}

.emergency-form-wrapper .section-header {
    border-bottom: 2px solid var(--gov-blue-60);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.emergency-form-wrapper .section-header h2 {
    color: var(--gov-blue-60);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.emergency-form-wrapper .section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Emergency Priority Indicators */
.priority-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gov-red-60);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.priority-indicator.high {
    background: var(--gov-red-60);
    animation: pulse 2s infinite;
}

.priority-indicator.medium {
    background: var(--gov-orange-60);
}

.priority-indicator.low {
    background: var(--gov-blue-60);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Required Field Enhancement for Emergency Situations */
.form-group.required label::after {
    content: " *";
    color: var(--gov-red-60);
    font-weight: 700;
    font-size: 1.1em;
}

.form-group.critical {
    border-left: 4px solid var(--gov-red-60);
    padding-left: 1rem;
    background: rgba(214, 48, 49, 0.05);
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
}

.form-group.critical label {
    color: var(--gov-red-60);
    font-weight: 600;
    font-size: 1rem;
}

/* Large Touch-Friendly Inputs for Emergency Use */
.emergency-input {
    min-height: 48px;
    font-size: 1.125rem;
    padding: 1rem;
    border: 2px solid var(--gov-gray-30);
    border-radius: 0.25rem;
    background: white;
    transition: all 0.2s ease;
    font-family: inherit;
}

.emergency-input:focus {
    border-color: var(--gov-blue-60);
    box-shadow: 0 0 0 3px rgba(0, 94, 162, 0.25);
    outline: none;
    background: #fafbfc;
}

.emergency-input.error {
    border-color: var(--gov-red-60);
    box-shadow: 0 0 0 3px rgba(214, 48, 49, 0.25);
}

.emergency-input.success {
    border-color: var(--gov-green-60);
    box-shadow: 0 0 0 3px rgba(0, 169, 28, 0.25);
}

/* Emergency Button Styling */
.emergency-submit {
    background: var(--gov-red-60);
    border: 2px solid var(--gov-red-60);
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 56px;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.emergency-submit:hover:not(:disabled) {
    background: var(--gov-red-70);
    border-color: var(--gov-red-70);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(214, 48, 49, 0.3);
}

.emergency-submit:active {
    transform: translateY(0);
}

.emergency-submit:disabled {
    background: var(--gov-gray-30);
    border-color: var(--gov-gray-30);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Quick Action Buttons */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action-btn {
    background: white;
    border: 2px solid var(--gov-blue-60);
    color: var(--gov-blue-60);
    padding: 1rem;
    border-radius: 0.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-height: 80px;
    justify-content: center;
}

.quick-action-btn:hover {
    background: var(--gov-blue-60);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 94, 162, 0.3);
}

.quick-action-btn i {
    font-size: 1.5rem;
}

.quick-action-btn span {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Emergency Help Text */
.emergency-help {
    background: var(--gov-gold-20);
    border: 1px solid var(--gov-orange-60);
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.emergency-help h4 {
    color: var(--gov-orange-60);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.emergency-help p {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.emergency-help ul {
    margin: 0.5rem 0 0 1.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Progress Indicator for Multi-Step Forms */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    position: relative;
}

.progress-step::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--gov-gray-30);
    z-index: -1;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.completed::after {
    background: var(--gov-green-60);
}

.progress-step.active::after {
    background: linear-gradient(to right, var(--gov-green-60) 50%, var(--gov-gray-30) 50%);
}

.progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gov-gray-30);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.progress-step.completed .progress-circle {
    background: var(--gov-green-60);
}

.progress-step.active .progress-circle {
    background: var(--gov-blue-60);
    box-shadow: 0 0 0 3px rgba(0, 94, 162, 0.25);
}

.progress-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.progress-step.completed .progress-label,
.progress-step.active .progress-label {
    color: var(--text-primary);
}

/* Emergency Contact Information */
.emergency-contact {
    background: var(--gov-red-60);
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
    text-align: center;
}

.emergency-contact h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.emergency-contact p {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.emergency-contact a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
}

.emergency-contact a:hover {
    text-decoration: underline;
}

/* Mobile Emergency Optimizations */
@media (max-width: 768px) {
    .emergency-form-wrapper {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 0.25rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .quick-action-btn {
        min-height: 60px;
        padding: 0.75rem;
    }
    
    .emergency-submit {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
        min-height: 48px;
    }
    
    .emergency-input {
        font-size: 1rem;
        min-height: 44px;
        padding: 0.875rem;
    }
    
    .form-progress {
        padding: 0 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .progress-circle {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .progress-label {
        font-size: 0.625rem;
    }
}

/* Dark Mode Emergency Forms */
[data-theme="dark"] .emergency-form-wrapper {
    background: var(--bg-secondary);
    border-color: var(--gov-blue-20);
}

[data-theme="dark"] .emergency-input {
    background: var(--bg-tertiary);
    border-color: var(--border-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .emergency-input:focus {
    background: var(--bg-secondary);
    border-color: var(--gov-blue-20);
    box-shadow: 0 0 0 3px rgba(115, 179, 231, 0.25);
}

[data-theme="dark"] .quick-action-btn {
    background: var(--bg-secondary);
    border-color: var(--gov-blue-20);
    color: var(--gov-blue-20);
}

[data-theme="dark"] .quick-action-btn:hover {
    background: var(--gov-blue-20);
    color: var(--bg-primary);
}

/* Emergency help section - dark mode with black text */
[data-theme="dark"] .emergency-help {
    background: rgba(255, 237, 213, 0.95);  /* Light peachy background */
    border-color: var(--gov-orange-40);
    color: #000000;  /* Black text */
}

[data-theme="dark"] .emergency-help h4 {
    color: #000000;  /* Black heading */
}

[data-theme="dark"] .emergency-help p {
    color: #000000;  /* Black paragraph text */
}

[data-theme="dark"] .emergency-help ul {
    color: #000000;  /* Black list text */
}

[data-theme="dark"] .emergency-help li {
    color: #000000;  /* Black list items */
}

/* High Contrast Emergency Mode */
@media (prefers-contrast: high) {
    .emergency-form-wrapper {
        border-width: 3px;
    }
    
    .emergency-input {
        border-width: 3px;
        font-weight: 600;
    }
    
    .emergency-submit {
        border-width: 3px;
        font-weight: 800;
    }
    
    .quick-action-btn {
        border-width: 3px;
        font-weight: 700;
    }
}