/* Farm Layout CSS */

.farm-layout {
    margin: 20px auto;
    position: relative;
    /* font-family: 'Roboto', sans-serif; */
}

.farm-key {
    background-color: #F5F5F5;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    
}

.farm-key-header {
    /* font-size: 18px; */
    font-weight: bold;
    margin-bottom: 10px;
    /* text-align: center; */
}

.farm-key-body {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    justify-content: center;
    margin-bottom: 10px;
    /* flex-wrap: wrap; */
}

.farm-key-section {
    margin: 0 10px 10px;
}

.key-subheader {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.farm-key-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.plot-key {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 1px solid #000;
}

.plot-available {
    background-color: #2CAB4C;
}

.plot-reserved {
    background-color: #6C757D;
}

.plot-booked {
    background-color: #EF4068;
}

.standard-plot {
    background-color: #e8f4e8;
    border: 1px solid #4a7e4a;
}

.premium-plot {
    background-color: #F5D6C6;
    border: 1px solid #c87d5b;
}

.farm-layout-container {
    border: 2px solid #333;
    padding: 20px;
    background-color: #f9f9f9;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}

.plot-grid {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 8px;
}

/* Horizontal scrolling plot grid */
.plot-grid {
    display: flex;
    flex-wrap: nowrap; /* Keep plots in a single row */
    gap: 10px;
    overflow-x: auto;  /* Enable horizontal scrolling */
    padding-bottom: 10px; /* Add some space for scrollbar */
}

.bottom-section {
    display: flex;
    gap: 10px;
}

.bottom-section-left {
    flex: 0 0 25%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bottom-section-right {
    flex: 0 0 75%;
}

.green-house {
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Media query for mobile devices to adjust sizes */
@media (max-width: 768px) {
    .farm-layout-container {
        padding: 10px;
    }

    .plot {
        height: 40px;  /* Slightly smaller */
        min-width: 25px; /* Slightly narrower */
        font-size: 9px;
    }

    .plot-grid {
        gap: 5px; /* Reduced gap */
    }

    .farm-key-body {
        flex-direction: column;
        align-items: center;
    }
}

.plot {
    height: 50px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    position: relative;
    cursor: pointer;
    /* transition: all 0.2s ease; */
}



.plot.premium-plot {
    height: 52px;
    width: 32px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Default state for plots is available */
.plot {
    background-color: #2CAB4C; /* Same as .plot-available */
    color: #fff;
}

.plot[data-status="reserved"] {
    background-color: #6C757D; /* Same as .plot-reserved */
    border-color: #5a6268;
    color: #fff;
}

.plot[data-status="booked"] {
    background-color: #EF4068; /* Same as .plot-booked */
    border-color: #c82333;
    color: #fff;
}

/* Make plot types show through with lower opacity on the backgrounds */
.standard-plot {
    opacity: 0.85;
}

.premium-plot {
    opacity: 0.85;
}

.green-house {
    background-color: #e8f9ff;
    border: 1px solid #86bbd8;
    grid-column: span 4;
    padding: 10px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #004085;
}

.terrace {
    background-color: #E8F4F8;
    border: 1px solid #b89f84;
    /* grid-column: span 4; */
    padding: 8px;
    text-align: center;
    font-size: 12px;
    color: #000;
}

.path {
    height: 15px;
    background-color: #f0f0f0;
    margin: 10px 0;
}

.farm-plot-summary {
    margin-top: 30px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
    max-width: 800px;
    margin: 30px auto 0;
}

.summary-table {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border-collapse: collapse;
}

.summary-table th, .summary-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

.summary-table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.summary-table .total-row {
    font-weight: bold;
    background-color: #f9f9f9;
}

/* Plot booking form styles */
.booking-form {
    margin-top: 20px;
}

.booking-form .form-group {
    margin-bottom: 15px;
}

.booking-form label {
    font-weight: bold;
}

.booking-plot-details {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #4a7e4a;
}

.plot-info-label {
    font-weight: bold;
    display: inline-block;
    min-width: 100px;
}

/* Tooltip customization */
.tooltip {
    position: absolute;
    z-index: 1070;
    display: block;
    margin: 0;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    word-break: normal;
    word-spacing: normal;
    white-space: normal;
    line-break: auto;
    font-size: 0.875rem;
    word-wrap: break-word;
    opacity: 0;
}

.tooltip.show {
    opacity: 0.9;
}

.tooltip-dark .tooltip-inner {
    background-color: #000;
    color: #fff;
}

.tooltip-inner {
    max-width: 200px;
    padding: 0.25rem 0.5rem;
    color: #fff;
    text-align: center;
    background-color: #000;
    border-radius: 0.25rem;
}

/* Plot status badges */
.plot-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    color: white;
    font-weight: bold;
    margin-left: 10px;
    font-size: 12px;
}

.status-available {
    background-color: #28a745;
}

.status-reserved {
    background-color: #6C757D;
    color: #fff;
}

.status-booked {
    background-color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .farm-layout-container {
        max-width: 600px;
    }
    
    .plot-grid {
        gap: 6px;
    }
    
    .plot {
        height: 45px;
        width: 28px;
        font-size: 10px;
    }
    
    .plot.premium-plot {
        height: 45px;
        width: 28px;
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .farm-layout-container {
        max-width: 450px;
        padding: 10px;
    }
    
    .plot-grid {
        gap: 4px;
    }
    
    .plot {
        height: 38px;
        width: 24px;
        font-size: 9px;
    }
    
    .plot.premium-plot {
        height: 38px;
        width: 24px;
        font-size: 10px;
    }
    
    .green-house, .terrace {
        font-size: 10px;
        padding: 5px;
    }
}

@media (max-width: 575px) {
    .farm-layout-container {
        max-width: 350px;
    }
    
    .plot-grid {
        gap: 3px;
    }
    
    .plot {
        height: 32px;
        width: 20px;
        font-size: 8px;
    }
    
    .plot.premium-plot {
        height: 32px;
        width: 20px;
        font-size: 9px;
    }
}
