/**
 * Livestock Manager - Frontend Styles
 * Responsive design for animal profile pages
 */

/* Base Styles */
.lm-animal-profile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* Header Section */
.lm-animal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    margin-bottom: 30px;
    gap: 20px;
}

/* Animal Image */
.lm-animal-image {
    flex: 0 0 auto;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.1);
}

.lm-animal-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lm-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
}

.lm-no-photo .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.lm-no-photo p {
    margin: 0;
    font-size: 14px;
}

.lm-animal-title h1 {
    margin: 0 0 10px 0;
    font-size: 2em;
    color: #fff;
}

.lm-tag-number {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

.lm-animal-status {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lm-status-badge,
.lm-gender-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    text-transform: capitalize;
}

.lm-gender-badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.lm-status-healthy {
    background: #28a745;
    color: #fff;
}

.lm-status-sick {
    background: #dc3545;
    color: #fff;
}

.lm-status-pregnant {
    background: #ffc107;
    color: #333;
}

.lm-status-dry {
    background: #6c757d;
    color: #fff;
}

/* Section Styles */
.lm-animal-details,
.lm-purchase-info,
.lm-breeding-info,
.lm-vaccination-info,
.lm-notes-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.lm-animal-details h2,
.lm-purchase-info h2,
.lm-breeding-info h2,
.lm-vaccination-info h2,
.lm-notes-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Details Grid */
.lm-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.lm-field-group {
    display: flex;
    flex-direction: column;
}

.lm-field-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.lm-field-value {
    padding: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1em;
}

/* Record Tables */
.lm-record-table-wrapper {
    overflow-x: auto;
    margin: 0 -20px;
    padding: 0 20px;
}

.lm-record-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.lm-record-table thead {
    background: #667eea;
    color: #fff;
}

.lm-record-table th,
.lm-record-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.lm-record-table tbody tr:hover {
    background: #f5f5f5;
}

/* Notes Section */
.lm-notes-content {
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lm-animal-profile {
        padding: 15px;
        margin: 10px;
    }

    .lm-animal-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        padding: 25px;
    }

    .lm-animal-image {
        width: 150px;
        height: 150px;
    }

    .lm-animal-title h1 {
        font-size: 1.5em;
    }

    .lm-animal-status {
        width: 100%;
        justify-content: center;
    }

    .lm-details-grid {
        grid-template-columns: 1fr;
    }

    .lm-record-table-wrapper {
        margin: 0 -15px;
        padding: 0 15px;
    }

    .lm-record-table th,
    .lm-record-table td {
        padding: 10px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .lm-animal-profile {
        padding: 10px;
        margin: 5px;
    }

    .lm-animal-title h1 {
        font-size: 1.3em;
    }

    .lm-tag-number {
        font-size: 1em;
    }

    .lm-status-badge,
    .lm-gender-badge {
        font-size: 0.85em;
        padding: 4px 10px;
    }

    .lm-animal-details h2,
    .lm-purchase-info h2,
    .lm-breeding-info h2,
    .lm-vaccination-info h2,
    .lm-notes-section h2 {
        font-size: 1.3em;
    }

    .lm-record-table th,
    .lm-record-table td {
        padding: 8px;
        font-size: 0.85em;
    }
}
