/*
  GozareshBinLab - Minimalist & Clean Styles (Inspired by provided example)
*/

/* --- Custom Properties (CSS Variables) --- */
:root {
    --primary-color: #4db6ac; /* Teal */
    --primary-color-dark: #26a69a; /* Darker Teal (for hover) */
    --secondary-color: #37474f; /* Dark Blue-Gray */
    --background-color: #f0f8ff; /* Light Blue (AliceBlue) */
    --text-color: #333;
    --border-color: #ced4da; /* Light Gray */
    --card-bg-color: #fff;
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --border-radius: 6px; /* Rounded corners */
}

/* --- Reset & Basic Styles --- */
body {
    font-family: sans-serif; /* Use system default font */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* --- Main Container --- */
.gbl-report-container {
    max-width: 960px; /* Increased max-width */
    margin: 1.5rem auto; /* Top/bottom margin and centering */
    padding: 1.5rem;
    background-color: var(--card-bg-color);
    border: 1px solid #b2dfdb; /* Calming teal border */
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Softer shadow */
}

/* --- Lab Info --- */
.gbl-lab-info {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #2e7d32; /* A harmonious green color */
}

/* --- Filters --- */
.gbl-filters {
    display: flex;
    flex-wrap: wrap; /* Wrap on smaller screens */
    gap: 1rem;
    align-items: flex-end; /* Align items to the bottom */
    margin-bottom: 1rem;
    justify-content: center; /* Center the filter items */
}

.gbl-filter-item {
    flex: 1 1 auto;
    min-width: 150px; /* Minimum width for filter items */
}

.gbl-filter-item:last-child {
    flex: 0 1 auto;
}

.gbl-filter-item label {
    display: block; /* Make labels block-level */
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #37474f;
}

/* --- Search Styles --- */
#gbl-report-search {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

#gbl-report-search:focus {
    outline: none;
    border-color: #26a69a; /* Darker Teal for Focus */
    box-shadow: 0 0 5px rgba(38, 166, 154, 0.25); /* Subtle shadow on focus */
}

/* --- Report List --- */
.gbl-report-list {
    margin-top: 2rem;
}

.gbl-report-date-group {
    margin-bottom: 2rem;
}

.gbl-report-date {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2e7d32; /* Green from example */
    margin-bottom: 0.5rem;
    margin-top: 15px;
}

.gbl-report-date-divider {
    color: #80cbc4;
    margin-bottom: 1rem;
}

/* --- Report Cards --- */
.gbl-report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Responsive grid */
    gap: 1.5rem;
    margin-top: 10px;
}

.gbl-report-card {
    background-color: var(--card-bg-color);
    border: 1px solid #b2dfdb; /* Calming teal border */
    border-radius: 8px;    /* More rounded corners */
    padding: 1.5rem;      /* More padding */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Softer shadow */
    text-align: center;
    transition: transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gbl-report-card:hover {
    transform: translateY(-5px); /* More noticeable lift */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* Larger shadow on hover */
}

.gbl-report-card-icon {
    margin-bottom: 1rem;
    color: var(--primary-color); /* Use primary color for icon */
}

.gbl-report-card-icon svg {
    width: 2.5rem;  /* Adjust as needed */
    height: 2.5rem; /* Adjust as needed */
    fill: currentColor; /* Use current text color for the SVG fill */
}

.gbl-report-card-title {
    font-size: 14px; /* Slightly larger title */
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;  
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gbl-report-card-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #4db6ac; /* Primary Teal */
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    border: none;
    cursor: pointer;
    width: 100%;
    margin-top: auto;
}

.gbl-report-card-button:hover {
    background-color: #26a69a; /* Darker Teal */
}

/* --- Error Message --- */
.error {
    color: #d32f2f; /* Darker red for errors */
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* --- Form Styles (for the shortcode form) --- */
.gbl-report-form {
    margin-bottom: 2rem;
    text-align: center;
    max-width: 700px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.gbl-report-form p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--secondary-color);
}

.gbl-report-form input[type="text"] {
    width: auto; /* تغییر از 100% به auto */
    max-width: 300px;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius); /* گردی فقط در سمت چپ */
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 0;
    box-sizing: border-box;
    display: inline-block; /* اضافه شده */
    vertical-align: middle; /* اضافه شده */
}

.gbl-report-form input[type="text"]:focus {
    outline: none;
    border-color: #26a69a;
    box-shadow: 0 0 5px rgba(38, 166, 154, 0.25);
}

.gbl-report-form input[type="submit"] {
    background-color: var(--primary-color);
    border: none;
    color: white;
    padding: 0.6rem 1.5rem;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    font-family: inherit;
    border-radius: 0 var(--border-radius) var(--border-radius) 0; /* گردی فقط در سمت راست */
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block; /* اضافه شده */
    vertical-align: middle; /* اضافه شده */
    margin-left: -4px; /* برای حذف فاصله بین دو عنصر */
}

.gbl-report-form input[type="submit"]:hover {
    background-color: var(--primary-color-dark);
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
    .gbl-report-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .gbl-report-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .gbl-report-cards {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    
    .gbl-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gbl-filter-item {
        width: 100%;
        min-width: auto;
    }
    
    .gbl-report-card {
        padding: 1rem;
    }
    
    .gbl-report-form {
        padding: 0 1rem;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .gbl-report-form input[type="text"] {
        width: 100%;
        max-width: 100%;
        border-radius: var(--border-radius);
        margin-bottom: 0.5rem;
    }
    
    .gbl-report-form input[type="submit"] {
        width: 100%;
        border-radius: var(--border-radius);
        margin-left: 0;
    }
}