/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fffe;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.2);
}

/* Main content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 2.5rem;
    color: #1e40af;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Form styles */
.permit-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-help {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Ornament guide */
.ornament-guide {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
}

.ornament-guide h3 {
    margin-bottom: 1rem;
    color: #374151;
}

.ornament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.ornament-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.ornament-card:hover,
.ornament-card.selected {
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ornament-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.ornament-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.ornament-card p {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Submit button */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .btn-loading {
    display: inline;
}

/* Messages */
.success-message,
.error-message {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.success-message {
    background: #f0fdf4;
    border: 2px solid #22c55e;
}

.error-message {
    background: #fef2f2;
    border: 2px solid #ef4444;
}

.success-icon,
.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-content h3,
.error-content h3 {
    margin-bottom: 1rem;
    color: #374151;
}

.permit-info {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: monospace;
    border: 1px solid #22c55e;
}

.next-steps {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 1rem 0;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* Footer */
.footer {
    background: #374151;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .permit-form {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .ornament-grid {
        grid-template-columns: 1fr;
    }
    
    .nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-link {
        text-align: center;
    }
}

/* Form validation styles */
.form-input.error,
.form-select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}