/**
 * Frontend CSS for Just Happy Dogs Meet & Greet Form
 */

.jhd-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.jhd-form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.jhd-form-header h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2em;
    font-weight: 600;
}

.jhd-required-note {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.jhd-required-asterisk {
    color: #dc3545;
    font-weight: bold;
}

.jhd-additional-screen {
    display: none;
}

.jhd-additional-screen.active {
    display: block;
}

.jhd-step-indicator {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.jhd-step-indicator .step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e1e5e9;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.jhd-step-indicator .step.active {
    background: #007cba;
    color: white;
}

.jhd-step-indicator .step.completed {
    background: #28a745;
    color: white;
}

.jhd-step {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.jhd-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.jhd-step-content {
    padding: 20px 0;
}

.jhd-instruction {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
    color: #0066cc;
    font-weight: 500;
}

.jhd-field-group {
    margin-bottom: 20px;
}

.jhd-field-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.jhd-field-group input,
.jhd-field-group select,
.jhd-field-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.jhd-field-group input:focus,
.jhd-field-group select:focus,
.jhd-field-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.jhd-field-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.jhd-field-row .jhd-field-group {
    flex: 1;
    margin-bottom: 0;
}

.jhd-checkbox-group,
.jhd-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.jhd-checkbox-group label,
.jhd-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
}

.jhd-checkbox-group input,
.jhd-radio-group input {
    width: auto;
    margin: 0;
}

.jhd-step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.jhd-three-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.jhd-three-buttons .jhd-btn {
    flex: 1;
    max-width: 150px;
}

.jhd-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.jhd-btn-primary {
    background: #007cba;
    color: white;
}

.jhd-btn-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.jhd-btn-secondary {
    background: #6c757d;
    color: white;
}

.jhd-btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.jhd-btn-cancel {
    background: #dc3545;
    color: white;
}

.jhd-btn-cancel:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.jhd-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
}

.jhd-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.jhd-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.jhd-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
}

.jhd-hidden {
    display: none !important;
}

/* Breed Selection Styles */
.breed-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.breed-filter-btn {
    padding: 5px 10px;
    border: 1px solid #e1e5e9;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.breed-filter-btn:hover {
    background: #f8f9fa;
}

.breed-filter-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.breed-select {
    height: 120px;
    overflow-y: auto;
}

/* Vaccination Styles */
.vaccination-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
}

.vaccination-name {
    flex: 1;
    font-weight: 600;
}

.vaccination-date {
    flex: 1;
}

.vaccination-date input {
    width: 100%;
    margin: 0;
}

.vaccination-status {
    flex: 0 0 80px;
    text-align: center;
    font-weight: 600;
}

.vaccination-remove {
    flex: 0 0 auto;
}

.remove-vaccination {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.remove-vaccination:hover {
    background: #c82333;
}

/* File Upload Styles */
.jhd-field-group input[type="file"] {
    padding: 8px;
    border: 2px dashed #e1e5e9;
    background: #f8f9fa;
}

.jhd-field-group input[type="file"]:hover {
    border-color: #007cba;
    background: #e7f3ff;
}

/* Pet Form Styles */
.pet-form {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f8f9fa;
}

.pet-form h4 {
    color: #007cba;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e5e9;
}

.file-upload-form {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f8f9fa;
}

.file-upload-form h4 {
    color: #007cba;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e5e9;
}

/* Success Message */
.jhd-success-message {
    text-align: center;
    padding: 40px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
}

.jhd-success-message h2 {
    color: #155724;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jhd-form-container {
        margin: 10px;
        padding: 15px;
    }
    
    .jhd-field-row {
        flex-direction: column;
        gap: 0;
    }
    
    .jhd-step-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .jhd-three-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .jhd-three-buttons .jhd-btn {
        max-width: none;
    }
    
    .jhd-checkbox-group,
    .jhd-radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .breed-filter {
        justify-content: center;
    }
    
    .vaccination-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .vaccination-name,
    .vaccination-date,
    .vaccination-status {
        flex: none;
    }
}

@media (max-width: 480px) {
    .jhd-form-header h2 {
        font-size: 1.5em;
    }
    
    .jhd-step-indicator {
        gap: 10px;
    }
    
    .jhd-step-indicator .step {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .breed-filter-btn {
        padding: 3px 6px;
        font-size: 12px;
    }
}

/* Loading States */
.jhd-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.jhd-btn:disabled:hover {
    transform: none !important;
}

/* Focus Management */
.jhd-step:not(.active) {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.jhd-step.active {
    position: relative;
    opacity: 1;
}

/* Accessibility */
.jhd-field-group input:required:invalid {
    border-color: #dc3545;
}

.jhd-field-group input:required:valid {
    border-color: #28a745;
}

/* Print Styles */
@media print {
    .jhd-step-buttons,
    .jhd-btn {
        display: none !important;
    }
    
    .jhd-step {
        display: block !important;
    }
    
    .jhd-form-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
