/* Base Styles (Mobile First) */

.myferm-main-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background: #333;
    color: #fff;
    padding: 1rem;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.myferm-main-header div {
    margin: 0 1rem;
}

.myferm-main-header a {
    color: #fff;
    text-decoration: none;
}

.myferm-main-header a:hover {
    text-decoration: underline;
}

.card-body {
    padding: 1rem;
}

.myferm-header-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table-bordered {
    border: 1px solid #ddd;
}

.table th, .table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #ddd;
}

.text-center {
    text-align: center;
}

.edit-icon, .remove-user {
    color: #333;
    text-decoration: none;
}

.edit-icon:hover, .remove-user:hover {
    color: #007bff; /* Adjust as needed */
}

/* Breakpoints */

/* Small Devices (phones, 600px and up) */
@media (min-width: 600px) {
	.myferm-main-header {
		flex-direction: column;
	}

	.myferm-main-header div {
		margin-bottom: 0.5rem;
	}

}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) {
	.myferm-main-header {
		flex-direction: row;
	}
	.myferm-main-header div {
		margin-bottom: 0;
	}
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
	.myferm-header-total {
		flex-direction: row;
	}

	.myferm-header-total h3 {
		margin: 0;
	}
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
	.card-body {
		padding: 2rem;
	}

	.table th, .table td {
		padding: 1rem;
	}
}
/* Responsive Styles for Devices Smaller than 768px */
@media (max-width: 767px) {
	body {
		font-size: 16px;
	}

	.table {
		min-width: 600px; /* Adjust min-width to ensure horizontal scrolling */
	}

	.table th, .table td {
		padding: 0.5rem; /* Adjust padding for smaller screens */
	}

	/* Optional: Add a border to the table container */
	.table-container {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
	}
	.card-5 .card-body {
		padding: 40px 10px 50px;
	}

	.user-info {
		width: 100%;
	}
	.form-row .value .row {
		margin-right: 0;
		margin-left: 0;
	}
	.menu-toggle {
		display: flex; /* Show the menu toggle on small screens */
	}

	.nav-menu {
		display: flex; /* Display flex to handle the transition */
		flex-direction: column;
		align-items: center;
		background-color: #333;
		width: 100%;
		position: absolute;
			top: 60px;
			left: 0;
			opacity: 0; /* Start as invisible */
			transform: translateY(-10px); /* Start slightly off-screen */
			transition: opacity 0.3s ease, transform 0.5s ease; /* Add transitions */
			padding: 1rem;
			box-sizing: border-box;
			visibility: hidden;
			align-items: flex-start;
    }

    .nav-menu.active {
			opacity: 1; /* Show the menu when active */
			visibility: visible;
			padding-left: 15px;
			padding-right: 60px;
			padding-top: 1em;
			padding-bottom: 1em;
			z-index: 1000;
		}

		.nav-menu a {
			padding: 1rem;
        border-bottom: 1px solid #444;
        text-align: left;
        font-size: 1.2em;
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }
    .close-btn {
        display: block; /* Show the close button when the menu is active */
    }
    .modal-dialog {
    	margin: 20px 0;
    }
    .modal-open .modal {
			width: 90vw;
			margin: 0 auto;
			overflow-x: hidden;
    }
    .modal .myferm-sec {
    	flex-direction: column;
    	width: 100%;
    }
    .modal .myferm-sec .feed-cell-1 {
    	font-size: 18px;
    	margin-bottom: 10px;
    }
    .modal .myferm-sec .feed-cell-2 {
    	margin-left: 0;
    	margin-bottom: 15px;
    }
    .modal .table {
    	width: 100%;
    	min-width: 0;
    }
    div.modal-lg {
			width: 100%;
		}
    .modal .table.myferm-table>tbody>tr>td:first-child {
    	width: 140px;
    }
    .modal .table.myferm-table>tbody>tr>td:not(:first-child) {
    	width: 60px;
    }
    .modal .table.myferm-table>tbody>tr>td>input {
    	max-width: 60px;
    	width: 60px;
		}
		.search-cows {
			width: 100%;
			width: 220px;
		}
		.modal-header .close {
			margin-top: -35px;
		}
		.close {
			font-size: 40px;
		}
		.half-width {
			width: 100%;
			margin-bottom: 5px;
		}
		.page-compare table.table.table-bordered.myferm-table {
			min-width: 0;
		}
		.single-cow .feed-cell-3 {
			margin-bottom: 15px;
		}
		.single-cow .feed-cell-4 {
			margin-left: 0;
			margin-bottom: 5px;
		}
		.single-cow .analyze-label,
		.page-compare .analyze-label {
			flex-direction: column;
		}
		.single-cow .analyze-label .al-label,
		.page-compare .analyze-label .al-label {
			margin-bottom: 10px;
		}
		.single-cow .analyze-label .myferm-period, 
		.page-compare .analyze-label .myferm-period {
			flex-direction: column;
			align-items: flex-start;
		}
		.single-cow .analyze-label .myferm-period .radio-container, 
		.page-compare .analyze-label .myferm-period .radio-container {
			padding-left: 0;
			margin-bottom: 10px;
		}
		.single-cow .analyze-label .myferm-period .radio-container.myferm-stat-option, 
		.single-cow .analyze-label .myferm-period .radio-container.myferm-stat-option .myferm-date-range, 
		.page-compare .analyze-label .myferm-period .radio-container.myferm-stat-option, 
		.page-compare .analyze-label .myferm-period .radio-container.myferm-stat-option .myferm-date-range {
			margin-left: 0;
		}
		.single-cow .analyze-label + .myferm-table, 
		.page-compare .analyze-label + .myferm-table {
			min-width: 0;
		}
		.myferm-header-total + div {
			position: relative;
		}
		.search-cow-icon {
			position: absolute;
			margin-left: 0;
			top: 25px;
			right: 10px;
		}
		.myferm-table-add .first-cell {
			width: 120px;
		}
		.myferm-table-add .dd-corpulence .button span {
			padding-left: 45px;
		}
		.myferm-table-add .dd-corpulence .button span, 
		.myferm-table-add .dd-health .button span {
			font-size: 0.9em;
		}
		body.single-cow .card-5,
		body.page-compare .card-5 {
			overflow-x: hidden;
		}
		.page-milk-norms .table-container {
			min-height: 50vh;
		}
		.page-password-recovery .input-group {
			display: block;
		}
}
@media only screen and (max-width: 768px) and (orientation: portrait) {
		.myferm-stats {
			min-height: 800px;
		}
		canvas {
			transform: rotate(90deg) translateX(25%) translateY(60%);
			height: 330px !important;
			width: 700px !important;
		}

		.myferm-header-total .buttons {
			display: flex;
			flex-direction: column;
			flex-wrap: wrap
		}
		.myferm-header-total .buttons .myferm-btn {
			margin-top: 10px;
		}

}
