/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header Styles */
header {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    margin-bottom: 30px;
    text-align: center;
    border-radius: 5px;
    position: relative;
}

header h1 {
    margin-bottom: 10px;
}

/* User authentication */
.user-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-button {
    display: inline-block;
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.auth-button:hover {
    background-color: #2980b9;
    text-decoration: none;
}

.logout-button {
    background-color: #e74c3c;
}

.logout-button:hover {
    background-color: #c0392b;
}

.admin-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f39c12;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.admin-link:hover {
    background-color: #d35400;
    text-decoration: none;
}

.user-info {
    font-size: 14px;
}

/* Flash messages */
.flash-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 16px;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Search Section */
.search-section {
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group.half {
    width: 50%;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Results Section */
.results-section {
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.results-section h2 {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.no-results {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
}

.trial-card {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.trial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.trial-title {
    margin-bottom: 10px;
    color: #2c3e50;
}

.trial-details {
    margin-bottom: 15px;
    color: #7f8c8d;
}

.trial-location {
    font-style: italic;
    margin-bottom: 15px;
}

.view-details {
    display: inline-block;
    background-color: #2ecc71;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.view-details:hover {
    background-color: #27ae60;
    text-decoration: none;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.pagination button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 0 10px;
}

.pagination button:hover {
    background-color: #2980b9;
}

.pagination button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

#page-info {
    font-size: 14px;
}

/* Footer */
footer {
    margin-top: 50px;
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
}

footer a {
    color: #3498db;
}

footer p {
    margin-bottom: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half {
        width: 100%;
    }
    
    .user-actions {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 15px;
        justify-content: center;
    }
}

/* Trial detail page */
.trial-detail-container {
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.trial-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.trial-header h2 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.trial-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.meta-item {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.meta-label {
    font-weight: bold;
    margin-right: 5px;
}

.trial-section {
    margin-bottom: 30px;
}

.trial-section h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.back-button {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    margin-top: 20px;
}

.back-button:hover {
    background-color: #2980b9;
    text-decoration: none;
}

/* Loading indicator */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

/* Gender Options */
.gender-options {
    display: flex;
    gap: 20px;
}

.gender-options label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.gender-options input[type="radio"] {
    width: auto;
    margin-right: 5px;
}

/* Status Check */
.status-check {
    display: flex;
    gap: 20px;
}

.status-check label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.status-check input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}

/* Location Check */
.location-check {
    display: flex;
    gap: 20px;
}

.location-check label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.location-check input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}
.trial-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.view-details-btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s; /* Smooth hover effect for background */

    
}

/* Hover effect for the button itself (e.g., darken slightly) */
.view-details-btn:hover {
    background-color: #1d699c; /* Slightly darker blue on hover */
    text-decoration: none;
}


/* Add/Modify this in your style.css */

.results-header-with-filters {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 40px; /* Space between items if they wrap */
}

.results-header-with-filters h2 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ai-summary-btn {
    background-color: transparent;
    color: #34495e; /* Or matching the border color */
    border: 2px solid #34495e; /* Dark blue or charcoal grey border */
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    /* Add hover/active states for interactivity */

    /* --- Styles for the Sparkle Effect --- */
    position: relative; /* Crucial for positioning the pseudo-element */
    overflow: hidden; /* Hides the shimmer until it's in view */
    z-index: 1; /* Ensures button content is above the shimmer */
    transition: background-color 0.3s ease; /* Smooth hover effect for background */
}

/* Hover effect for the button itself (e.g., darken slightly) */
.ai-summary-btn:hover {
    background-color: #bfdff4; /* Slightly darker green on hover */
}

/* The Sparkle Pseudo-element */
.ai-summary-btn::before {
    content: ''; /* Required for pseudo-elements */
    position: absolute;
    top: 0;
    left: -100%; /* Start the shimmer off-screen to the left */
    width: 100%;
    height: 100%;
    /* The sparkle gradient: transparent -> semi-transparent white -> transparent */
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4), /* Adjust opacity (0.4) for desired sparkle intensity */
        transparent
    );
    transition: left 0.7s ease-in-out; /* Animate the 'left' property smoothly */
    z-index: -1; /* Place the shimmer behind the button text */
}

/* Animate the sparkle across the button on hover */
.ai-summary-btn:hover::before {
    left: 100%; /* Move the shimmer across the button to the right */
}


/* Full Criteria section */
.criteria-section h4 {
    margin-top: 0px;
    margin-bottom: 0px;
}

/* Bullet lists for inclusion/exclusion */
.criteria-section ul {
    list-style-type: disc; /* standard bullet */
    margin-left: 30px;     /* indents bullets */
    margin-bottom: 0px;   /* spacing after list */
}

/* Optional: indent nested <li> if needed */
.criteria-section ul li {
    margin-bottom: 5px;    /* space between items */
}





