/* lm-add-animal.css - Responsive Redesign */
:root {
    --primary-color: #2c5f2d;
    --primary-dark: #1e3a1f;
    --primary-light: #4a7c4b;
    --secondary-color: #ffb347;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --transition: all 0.2s ease;
}

/* Container */
.lm-add-animal-container {
    max-width: 900px;
    margin: 1.75rem auto;
    padding: 0 1rem;
}

.lm-add-animal-wrapper {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
}

.lm-form-title,
.lm-add-animal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.2;
    color: var(--gray-900);
}

.lm-add-animal-card {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

/* Header */
.lm-add-animal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lm-add-animal-header h2 {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.025em;
}

.lm-add-animal-header p {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Form Body */
.lm-add-animal-form {
    padding: 2rem;
}

/* Form Sections */
.lm-form-section {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 1.5rem;
}

.lm-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.lm-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lm-section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
}

/* Form Groups - Grid Layout */
.lm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.lm-form-group {
    margin-bottom: 0;
}

.lm-form-group-full,
.lm-form-group.lm-full-width {
    grid-column: span 2;
}

.lm-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.lm-form-group .required {
    color: var(--danger-color);
    margin-left: 0.25rem;
}

/* Input Fields */
.lm-form-group input,
.lm-form-group select,
.lm-form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-900);
    background-color: #fff;
    transition: var(--transition);
}

.lm-form-group input:focus,
.lm-form-group select:focus,
.lm-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

.lm-form-group input:hover:not(:disabled),
.lm-form-group select:hover:not(:disabled),
.lm-form-group textarea:hover:not(:disabled) {
    border-color: var(--gray-400);
}

.lm-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* File Upload */
.lm-file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.lm-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.lm-file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.lm-file-upload-label:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
}

.lm-file-upload-label .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: var(--gray-500);
}

.lm-file-name {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
    text-align: center;
}

/* Radio & Checkbox Groups */
.lm-radio-group,
.lm-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.lm-radio-option,
.lm-checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lm-radio-option input[type="radio"],
.lm-checkbox-option input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.lm-radio-option label,
.lm-checkbox-option label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Gender Specific Radio Styling */
.lm-gender-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.lm-gender-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lm-gender-option input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
}

.lm-gender-option label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

.lm-gender-option .gender-icon {
    font-size: 1rem;
}

/* Action Buttons */
.lm-form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.lm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
}

.lm-btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.lm-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.lm-btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.lm-btn-secondary:hover {
    background: var(--gray-300);
}

.lm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Alert Messages */
.lm-alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.lm-alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.lm-alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.lm-alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.lm-alert .dashicons {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.lm-alert-content {
    flex: 1;
    font-size: 0.875rem;
}

.lm-alert-content p {
    margin: 0;
}

/* Loading State */
.lm-loading {
    position: relative;
    pointer-events: none;
}

.lm-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lm-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lm-spin 0.6s linear infinite;
}

@keyframes lm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tooltips */
.lm-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 0.25rem;
    cursor: help;
}

.lm-tooltip .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: var(--gray-400);
}

.lm-tooltip:hover::before {
    content: attr(data-tip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    background: var(--gray-800);
    color: #fff;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    z-index: 100;
    margin-bottom: 0.5rem;
}

/* Input Group (for currency) */
.lm-input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.lm-input-group .lm-input-prefix {
    padding: 0.625rem 0.75rem;
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 500;
    border-right: 1px solid var(--gray-300);
}

.lm-input-group input {
    border: none;
    flex: 1;
}

.lm-input-group input:focus {
    outline: none;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lm-add-animal-container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .lm-add-animal-header {
        padding: 1.5rem;
    }

    .lm-add-animal-header h2 {
        font-size: 1.5rem;
    }

    .lm-add-animal-form {
        padding: 1.5rem;
    }

    .lm-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .lm-form-group-full {
        grid-column: span 1;
    }

    .lm-section-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .lm-form-actions {
        flex-direction: column-reverse;
    }

    .lm-btn {
        width: 100%;
        justify-content: center;
    }

    .lm-gender-options {
        gap: 1rem;
        flex-direction: column;
    }

    .lm-radio-group,
    .lm-checkbox-group {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .lm-add-animal-header {
        padding: 1.25rem;
    }

    .lm-add-animal-header h2 {
        font-size: 1.25rem;
    }

    .lm-add-animal-header p {
        font-size: 0.75rem;
    }

    .lm-add-animal-form {
        padding: 1rem;
    }

    .lm-form-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .lm-form-group input,
    .lm-form-group select,
    .lm-form-group textarea {
        padding: 0.5rem 0.75rem;
        font-size: 0.813rem;
    }

    .lm-alert {
        padding: 0.75rem;
        font-size: 0.813rem;
    }
}

/* Print Styles */
@media print {
    .lm-add-animal-container {
        margin: 0;
        padding: 0;
    }

    .lm-add-animal-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .lm-form-actions {
        display: none;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    /* This is optional - add if you want dark mode support */
}