/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    text-align: left; /* Default for LTR languages */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.3rem 0.8rem;
    border: 1px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-btn.active, .lang-btn:hover {
    background: #667eea;
    color: white;
}

/* Main Content */
main {
    margin-top: 80px; /* Adjusted for fixed header */
    padding: 2rem 0;
}

.hero {
    text-align: center;
    padding: 4rem 0;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.auth-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.user-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.user-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.user-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.user-card h3 {
    margin-bottom: 0.5rem;
}

.consumer-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.breeder-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.butcher-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

/* Forms */
.auth-form {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}
.form-group input[type="date"] {
    appearance: none; /* Optional: better control over styling */
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s, background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none; /* For button-like links */
}
.btn i {
    font-size: 0.9em;
}


.btn:hover {
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}


.btn-secondary {
    background: #6c757d;
    margin-left: 1rem;
}
.btn-secondary:hover {
     background: #5a6268;
}


/* Services Section */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.service-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card i.fa-calendar-alt, 
.service-card i.fa-map-marker-alt,
.service-card i.fa-truck,
.service-card i.fa-cut,
.service-card i.fa-shipping-fast,
.service-card i.fa-percent {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}


/* Dashboard */
.dashboard {
    display: none; /* Initially hidden */
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1000px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.dashboard.active {
    display: block;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e1e1e1;
}
.dashboard-header h2 {
    color: #667eea;
}

.dashboard-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.dashboard-nav button {
    padding: 0.5rem 1rem;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.dashboard-nav button.active, .dashboard-nav button:hover {
    background: #667eea;
    color: white;
}

.dashboard-content {
    display: none; /* Content panes hidden by default */
}

.dashboard-content.active {
    display: block;
}

/* Booking Form */
.booking-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}
.booking-form h3, .booking-form h4 {
    color: #333;
    margin-bottom: 1rem;
}
#total-price {
    color: #667eea;
    font-weight: bold;
}


.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Status Cards */
.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.status-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.status-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.status-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Orders List - specific styling for order items */
#orders-list .service-card { /* Re-using service-card for consistency */
    text-align: left;
    margin-bottom: 1rem;
}
#orders-list .service-card h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
}
#orders-list .service-card p {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}
.status-pending { color: orange; font-weight: bold; }
.status-confirmed { color: green; font-weight: bold; }
.status-completed { color: blue; font-weight: bold; }
.status-cancelled { color: red; font-weight: bold; }
.status-unknown { color: gray; font-weight: bold; }


/* Livestock List */
#livestock-list .service-card {
    text-align: left;
    margin-bottom: 1rem;
}


/* Contact Section */
.contact-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.contact-info h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.contact-item i {
    color: #667eea;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Could be replaced with a burger menu */
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .user-types {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }
    .btn {
        padding: 0.8rem 1.5rem; /* Adjust button padding for smaller screens */
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3); /* Lighter border for visibility on dark buttons */
    border-top: 3px solid #fff; /* White spinner part */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem; /* Space between spinner and text if any */
}
/* For buttons that only show spinner */
.btn .loading-only {
    margin-right: 0;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notification {
    position: fixed;
    top: 90px; /* Below fixed header */
    right: 20px;
    background: #28a745; /* Default success */
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    z-index: 1001;
    display: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    min-width: 250px;
    text-align: center;
}

.notification.info {
    background: #17a2b8;
}
.notification.error {
    background: #dc3545;
}

.notification.show {
    display: block;
    animation: slideInNotif 0.3s ease-out, fadeOutNotif 0.3s ease-in 2.7s forwards;
}

@keyframes slideInNotif { /* Renamed to avoid conflict if another slideIn exists */
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOutNotif { /* Renamed */
    from { opacity: 1; }
    to { opacity: 0; transform: translateX(100%); }
}