/**
 * Feed Shortcodes Styles
 * @package LivestockManager
 */

/* Base Styles */
.lm-feeding-schedule-wrapper {
    background: #fcfffe;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(17, 121, 106, 0.16);
    padding: 24px;
    margin: 1.25rem 0;
    border: 1px solid #c8ebe5;
}

/* Header Styles */
.lm-feeding-schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #dbf2ee;
}

.lm-feeding-schedule-header h3 {
    margin: 0;
    color: #0f5f53;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lm-feeding-schedule-header .lm-badge-scheduled,
.lm-feeding-schedule-header .lm-badge-upcoming {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lm-feeding-schedule-header .lm-badge-scheduled {
    background: #1abc9c;
    color: #fff;
}

.lm-feeding-schedule-header .lm-badge-upcoming {
    background: #f39c12;
    color: #fff;
}

/* Button Styles */
.lm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lm-btn-primary {
    background: #667eea;
    color: #fff;
}

.lm-btn-primary:hover {
    background: #5568d3;
}

.lm-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.lm-btn-secondary:hover {
    background: #d0d0d0;
}

.lm-btn-danger {
    background: #e74c3c;
    color: #fff;
}

.lm-btn-danger:hover {
    background: #c0392b;
}

.lm-btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.lm-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Schedule List Styles */
.lm-schedule-list {
    display: grid;
    gap: 15px;
}

.lm-no-records {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 4px;
    text-align: center;
}

.lm-no-records p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.lm-schedule-day {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #def3ee;
    margin-bottom: 12px;
}

.lm-schedule-day h4 {
    margin: 0 0 10px 0;
    color: #0f5f53;
    font-size: 1rem;
    font-weight: 700;
}

.lm-feeding-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lm-feeding-item {
    display: grid;
    grid-template-columns: 100px 1fr 120px auto;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e4f4f0;
    align-items: center;
}

.lm-feeding-item:last-child {
    border-bottom: none;
}

.lm-time {
    font-weight: 700;
    color: #127b68;
}

.lm-feed {
    color: #1f6f63;
    font-weight: 600;
}

.lm-quantity {
    font-weight: 700;
    color: #1abc9c;
}

.lm-feeding-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.lm-feeding-actions .lm-btn {
    background: #eafaf8;
    color: #0f6f5f;
    border: 1px solid #b2e9dd;
}

.lm-feeding-actions .lm-btn:hover {
    background: #16a085;
    color: #fff;
    border-color: #149078;
}

.lm-feeding-item:last-child {
    border-bottom: none;
}

.lm-time {
    font-weight: 600;
    min-width: 80px;
    color: #333;
}

.lm-feed {
    flex: 1;
    color: #555;
}

.lm-quantity {
    font-weight: 600;
    color: #667eea;
}

.lm-feeding-actions {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

/* Modal Styles */
.lm-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.lm-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.lm-modal-small {
    max-width: 400px;
}

.lm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.lm-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.lm-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lm-modal-close:hover {
    color: #333;
}

.lm-modal-body {
    padding: 20px;
}

.lm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
}

/* Form Styles */
.lm-form-group {
    margin-bottom: 15px;
}

.lm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.lm-form-group .required {
    color: #e74c3c;
}

.lm-form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.lm-form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* Animal Selection Styles */
.lm-animal-selection {
    margin: 18px 0;
    padding: 18px;
    background: #f0fcf9;
    border-radius: 12px;
    border: 1px solid #c8ece3;
}

.lm-animal-selection label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #0f6655;
}

.lm-animal-selection select {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #bfe6db;
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
}

.lm-scheduled-item {
    background-color: #ecfbf7;
    border-left: 4px solid #17a085;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.lm-badge-scheduled {
    display: inline-block;
    padding: 4px 10px;
    background-color: #20b69f;
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .lm-feeding-schedule-wrapper {
        padding: 14px;
    }

    .lm-feeding-schedule-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .lm-schedule-day {
        padding: 14px;
    }

    .lm-feeding-item {
        display: grid;
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto auto;
        gap: 8px;
        padding: 10px 0;
    }

    .lm-time,
    .lm-quantity,
    .lm-feed {
        min-width: initial;
    }

    .lm-feeding-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
    }

    .lm-modal-content {
        width: 95%;
        margin: 5% auto;
    }
}
