/**
 * Zwingernamen-Antrag Frontend Styles
 * Modern, responsive design with smooth animations
 */

/* Container & Layout */
.zna-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* Success/Error Messages */
.zna-success-message,
.zna-error-message {
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 32px;
    animation: slideInDown 0.4s ease-out;
}

.zna-success-message {
    background: linear-gradient(135deg, #d4f8e7 0%, #bfe6d9 100%);
    border: 2px solid #86e3ce;
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.15);
}

.zna-error-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #fca5a5;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.15);
}

.zna-success-icon,
.zna-error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.zna-success-icon {
    background-color: #10b981;
    color: white;
}

.zna-error-icon {
    background-color: #ef4444;
    color: white;
}

.zna-success-message h3,
.zna-error-message h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.zna-success-message p,
.zna-error-message p {
    margin: 8px 0;
    font-size: 16px;
    color: #374151;
}

.zna-submission-id {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: #1e40af;
    font-weight: 700;
}

.zna-success-text {
    font-size: 14px;
    color: #6b7280;
    max-width: 480px;
    margin: 16px auto 0;
}

/* Form Wrapper */
.zna-form-wrapper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Form Header */
.zna-form-header {
    padding: 32px 32px 24px;
    background: linear-gradient(135deg, #1a1d3a 0%, #2d1b4e 100%);
    color: white;
}

.zna-form-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.zna-form-description {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Progress Bar */
.zna-progress-bar {
    display: flex;
    justify-content: space-between;
    padding: 24px 32px;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.zna-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}

.zna-progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    right: -50%;
    height: 2px;
    background-color: #e5e7eb;
    z-index: 0;
}

.zna-progress-step.zna-active:not(:last-child)::after {
    background: linear-gradient(90deg, #5b6fd8 0%, #7c5ba5 100%);
}

.zna-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #9ca3af;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 1;
}

.zna-progress-step.zna-active .zna-step-number {
    background: linear-gradient(135deg, #5b6fd8 0%, #7c5ba5 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(91, 111, 216, 0.4);
    transform: scale(1.15);
}

.zna-step-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    text-align: center;
}

.zna-progress-step.zna-active .zna-step-label {
    color: #5b6fd8;
}

/* Form Steps */
.zna-form {
    padding: 32px;
}

.zna-form-step {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.zna-form-step.zna-active {
    display: block;
}

/* Fieldset */
.zna-fieldset {
    margin-bottom: 32px;
}

.zna-fieldset-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.zna-icon {
    flex-shrink: 0;
    color: #5b6fd8;
}

/* Form Grid */
.zna-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.zna-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Form Groups */
.zna-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zna-form-group-flex {
    flex: 1;
}

/* Labels */
.zna-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
}

.zna-required {
    color: #ef4444;
}

.zna-optional {
    font-weight: 400;
    color: #9ca3af;
    font-size: 13px;
}

/* Inputs */
.zna-input,
.zna-select,
.zna-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
    outline: none;
}

.zna-input:focus,
.zna-select:focus,
.zna-textarea:focus {
    border-color: #5b6fd8;
    box-shadow: 0 0 0 4px rgba(91, 111, 216, 0.1);
}

.zna-input::placeholder,
.zna-textarea::placeholder {
    color: #9ca3af;
}

.zna-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Info Box */
.zna-info-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
    color: #1e40af;
}

.zna-info-box-light {
    background-color: #f9fafb;
    border-color: #e5e7eb;
    color: #6b7280;
}

.zna-info-icon {
    flex-shrink: 0;
    color: #3b82f6;
}

/* Cattery Items */
.zna-cattery-item {
    background-color: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.zna-cattery-item:hover {
    border-color: #5b6fd8;
    box-shadow: 0 4px 12px rgba(91, 111, 216, 0.08);
}

.zna-cattery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.zna-cattery-number {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.zna-cattery-fields {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: flex-end;
}

.zna-cattery-name-input {
    font-weight: 600;
}

/* Check Status */
.zna-check-status {
    position: relative;
    min-height: 24px;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.zna-check-status.checking {
    color: #6b7280;
}

.zna-check-status.available {
    color: #10b981;
}

.zna-check-status.taken {
    color: #ef4444;
}

.zna-check-status.similar {
    color: #f59e0b;
}

/* Badge */
.zna-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
}

.zna-badge-primary {
    background-color: #5b6fd8;
    color: white;
}

/* Confirm Box */
.zna-confirm-box {
    background-color: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
}

/* Checkbox */
.zna-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.zna-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.zna-checkbox-custom {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
    transition: all 0.2s ease;
    position: relative;
}

.zna-checkbox:checked + .zna-checkbox-custom {
    background: linear-gradient(135deg, #5b6fd8 0%, #7c5ba5 100%);
    border-color: #5b6fd8;
}

.zna-checkbox:checked + .zna-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.zna-checkbox-text {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

/* Buttons */
.zna-form-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.zna-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    text-decoration: none;
}

.zna-btn-icon {
    flex-shrink: 0;
}

.zna-btn-primary {
    background: linear-gradient(135deg, #5b6fd8 0%, #7c5ba5 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(91, 111, 216, 0.3);
}

.zna-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(91, 111, 216, 0.4);
}

.zna-btn-primary:active {
    transform: translateY(0);
}

.zna-btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
}

.zna-btn-secondary:hover {
    background-color: #e5e7eb;
}

.zna-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    flex: 1;
}

.zna-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.zna-btn-submit {
    min-height: 56px;
}

/* Small Text */
.zna-small {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .zna-container {
        padding: 16px 12px;
    }
    
    .zna-form-wrapper {
        border-radius: 16px;
    }
    
    .zna-form-header {
        padding: 24px 20px;
    }
    
    .zna-form-header h2 {
        font-size: 24px;
    }
    
    .zna-progress-bar {
        padding: 16px 20px;
    }
    
    .zna-step-label {
        font-size: 11px;
    }
    
    .zna-form {
        padding: 24px 20px;
    }
    
    .zna-form-grid,
    .zna-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .zna-cattery-fields {
        grid-template-columns: 1fr;
    }
    
    .zna-form-actions {
        flex-direction: column;
    }
    
    .zna-btn {
        width: 100%;
    }
    
    .zna-btn-prev {
        order: 2;
    }
    
    .zna-btn-next,
    .zna-btn-submit {
        order: 1;
    }
}

@media (max-width: 480px) {
    .zna-progress-step:not(:last-child)::after {
        display: none;
    }
    
    .zna-fieldset-title {
        font-size: 18px;
    }
}

/* Loading State */
.zna-form.loading {
    pointer-events: none;
    opacity: 0.6;
}

.zna-form.loading::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border: 4px solid #e5e7eb;
    border-top-color: #5b6fd8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
