body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem;
}

main {
    padding: 2rem;
}

.green {
    color: #4CAF50;
    font-weight: bold;
}

.red {
    color: red;
}

.bluebtn {
    background-color: #4c5daf;
}

.hidden {
    display: none !important;
}

.user-card {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    padding: 1rem;
}

.user-top {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.user-info {
    order: -1;
    margin-bottom: 1rem;
}

.crop-info {
    width: 100%;
}




.daily-tasks {
    border: 1px solid #ccc; 
    padding: 10px; 
    margin-top: 10px;
}

.daily-tasks .dailyTaskTitle {
    font-weight: bold;
}

.more-info-div {
    border-top: 1px solid #333;
}

.vouchers-div {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;    
    border: solid 1px #ccc;
    padding: 15px;    
}

.schedulecropid {
    font-size: 8pt;
    color: #939393;
}

@media (min-width: 768px) {
    .user-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .user-info {
        flex: 1;
        order: 0;
        margin-bottom: 0;
    }

    .crop-info {
        flex: 2;
    }
}

.user-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 3px;
}

button:hover {
    background-color: #45a049;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #333;
    color: #fff;
}

.cropSelectionHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    position: sticky;
    top: 0;
    background-color: #616161;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease-in-out;
}

#cropSelection h2 {
    margin-top: 0;
    margin-bottom: 0
}

#backButton {
    font-size: 24px;
    cursor: pointer;
}

#cropList {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 1rem;
}

.cropInfoDiv {
    min-width: 320px;
    width: 30vw;
    min-height: 395px;
    border: 1px solid #ccc;
    margin: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.cropInfoDiv.selected {
    border: 2px solid red;
}

.cropInfoDiv img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.cropInfoDiv p {
    margin: 5px 0;
    text-align: center;
}

.cropInfoDiv .bold {
    font-weight: bold;
}

.cropInfoDiv .redirect-url-parent {
    height: 26px;
    padding-bottom: 20px;
}

.cropInfoDiv .redirect-url-parent a {
    display: none;
  }
  
  /* When parent is selected, show the anchor with nice styling */
  .cropInfoDiv.selected .redirect-url-parent a {
    display: inline-block;
    color: #3366cc;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
  }
  
  /* Hover effects for better user experience */
  .cropInfoDiv.selected .redirect-url-parent a:hover {
    background-color: rgba(51, 102, 204, 0.1);
    text-decoration: underline;
    color: #1a4cb3;
  }
  
  /* Focus state for accessibility */
  .cropInfoDiv.selected .redirect-url-parent a:focus {
    outline: 2px solid #3366cc;
    outline-offset: 2px;
  }

.cropSelectionHeader {
    display: flex;
    flex-direction: row;
}

.cropSelectionHeader .left {
    width: 50%;
    display: flex;
    justify-content: space-between;
}

/* Container for the entire crop section */
.newCropDiv {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    padding: 10px;
    margin: 0px;
    border-radius: 10px;
    background-color: #f9f9f9;
    color: black;
}

/* Container for each individual div inside newCropDiv */
.newCropDiv div {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.newCropDiv .smallLabel {
    font-size: 10px;
}

/* Styling for checkboxes and labels */
.newCropDiv input[type="checkbox"] {
    margin-right: 5px;
}

.newCropDiv label {
    font-size: 16px;
    font-weight: 500;
    margin-right: 10px;
}

/* Styling for date input */
.newCropDiv input[type="date"] {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* Styling for the button */
#plantCropButton {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

/* Button hover effect */
#plantCropButton:hover {
    background-color: #45a049;
}

.backpack-info {
    margin-top: 10px;
    border: 1px solid #ccc;
    padding: 10px;
}

.backpack-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.backpack-item button {
    margin-left: 10px;
}

.shed-shop-info {
    margin-top: 10px;
    border: 1px solid #ccc;
    padding: 10px;
}

.shed-shop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.shed-shop-item button {
    margin-left: 10px;
}


.vouchers-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    min-width: 260px;
}

.voucher-container {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 16px;
    display: flex;
    align-items: flex-start; /* Changed to flex-start to align with top */
    max-width: 450px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.merchant-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 16px;
    width: 60px; /* Fixed width for the merchant section */
}

.merchant-logo {
    width: 60px;
    height: 60px;
    position: relative;
    margin-bottom: 4px; /* Space between icon and text */
}

.merchant-logo img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.icon-text {
    font-size: 12px;
    color: #757575;
    text-align: center;
    word-wrap: break-word;
    max-width: 60px; /* Match width of logo */
}

.preferred-badge {
    position: absolute;
    bottom: -8px;
    left: 0;
    background-color: #ee4d2d;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 2px;
}

.voucher-details {
    flex-grow: 1;
}

.voucher-value {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
}

.min-spend {
    font-size: 14px;
    color: #757575;
    margin-bottom: 4px;
}

.tag {
    display: inline-block;
    border: 1px solid #ee4d2d;
    color: #ee4d2d;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 2px;
    margin-bottom: 4px;
}

.validity {
    font-size: 12px;
    color: #757575;
}

.use-button {
    padding: 6px 16px;
    background-color: white;
    border: 1px solid #ee4d2d;
    color: #ee4d2d;
    border-radius: 2px;
    cursor: pointer;
}

.tnc-link {
    color: #757575;
    text-decoration: none;
    font-size: 12px;
    margin-left: 4px;
}

@media (max-width: 889px) {
    .cropInfoDiv {
        min-width: 90%;
        width: 30vw;
        min-height: 395px;
        border: 1px solid #ccc;
        margin: 10px;
        padding: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        cursor: pointer;
    }

    .newCropDiv div {
        margin-right: 2px;
    }

    .newCropDiv input[type="date"] {
        font-size: 13px;
    }

    .mobileHidden {
        display: none;
    }

    .cropSelectionHeader {
        display: flex;
        flex-direction: column;
    }
    
    .cropSelectionHeader .left {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }    

    .newCropDiv label {
        font-size: 12px;
        margin-right: 2px;
    }

    #plantCropButton {
        font-size: 13px;
    }
}

@media (min-width: 890px) and (max-width: 1750px) {
    .cropInfoDiv {
        min-width: 320px;
        width: 45%;
        min-height: 395px;
        border: 1px solid #ccc;
        margin: 10px;
        padding: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        cursor: pointer;
    }
}


#cropSearchSection {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#cropSearchSection h2 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.button-group button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.button-group button:first-child {
    background-color: #4CAF50;
    color: white;
}

#cropSelection {
    height: 100vh;
    overflow-y: scroll;
}

.header-hidden {
    top: -250px !important;
}

.button-group button:last-child {
    background-color: #f44336;
    color: white;
}
/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f2f5;
}

.login-box {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.login-box h1 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
}

.login-box .form-group {
    margin-bottom: 1rem;
}

.login-box label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 600;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
    border-color: #4CAF50;
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #45a049;
}

.flashes {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.flashes .alert {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.flashes .alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
    }
}
