/* Beekee Cohort Manager Custom Styles */

/* Admin menu category styling - be more specific to target only the main category */
/* Target only the main plugin category, not individual items */
.block_adminblock .content ul li:has(> a[href*="category=local_beekee_cohort_manager"]) > a,
.adminblock .content ul li:has(> a[href*="category=local_beekee_cohort_manager"]) > a,
li[data-key="local_beekee_cohort_manager"] > .tree_item > a,
.type_category[data-key="local_beekee_cohort_manager"] > .tree_item > a {
    font-weight: bold !important;
    position: relative;
    padding-left: 25px !important;
}

/* Add icon before the main plugin category only */
.block_adminblock .content ul li:has(> a[href*="category=local_beekee_cohort_manager"]) > a:before,
.adminblock .content ul li:has(> a[href*="category=local_beekee_cohort_manager"]) > a:before,
li[data-key="local_beekee_cohort_manager"] > .tree_item > a:before,
.type_category[data-key="local_beekee_cohort_manager"] > .tree_item > a:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('../pix/icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* More specific targeting for different Moodle admin structures */
.admin-navigation .type_category[data-key="local_beekee_cohort_manager"] > .tree_item > a {
    font-weight: bold !important;
    padding-left: 25px !important;
    position: relative;
}

.admin-navigation .type_category[data-key="local_beekee_cohort_manager"] > .tree_item > a:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('../pix/icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* DO NOT style individual menu items - remove previous overly broad selectors */
/* Only target headers in admin settings pages */
#region-main .admin-configui h2:contains("Gestionnaire de Cohortes Beekee"),
#region-main .admin-configui h2:contains("Beekee Cohort Manager") {
    font-weight: bold !important;
    position: relative;
    padding-left: 30px;
}

#region-main .admin-configui h2:contains("Gestionnaire de Cohortes Beekee"):before,
#region-main .admin-configui h2:contains("Beekee Cohort Manager"):before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url('../pix/icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Updated Getting Started Page Styles */
.beekee-getting-started {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.beekee-header {
    margin-bottom: 40px;
    padding: 40px;
    background: url('/local/beekee_cohort_manager/pix/cohort_manager_banner.png') center center;
    background-size: cover;
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: left; /* Changed from center to left */
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center; /* Vertical centering */
}

/* Add overlay for better text readability if needed */
.beekee-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 51, 160, 0.3); /* Semi-transparent overlay with your brand color */
    border-radius: 12px;
    z-index: 1;
}

.beekee-header > * {
    position: relative;
    z-index: 2;
}

/* Content wrapper with max width */
.beekee-header-content {
    max-width: 600px;
    width: 100%;
}

.beekee-header .plugin-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
}

.beekee-header-title {
    margin: 0 0 15px 0;
    font-size: 2.5em;
    font-weight: bold; /* Made explicitly bold */
    color: white !important; /* Override theme CSS */
    text-align: left; /* Left aligned */
}

.beekee-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.5em;
    font-weight: bold; /* Made explicitly bold */
    color: white;
    text-align: left; /* Left aligned */
}

.beekee-header p {
    margin: 0 0 20px 0;
    font-size: 1.1em;
    color: white;
    font-weight: normal; /* Explicitly not bold */
    line-height: 1.6;
    text-align: left; /* Left aligned */
    max-width: none; /* Remove width restriction */
}

.beekee-copyright {
    background: white;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px; /* Pill shape */
    font-size: 0.9em;
    font-style: normal; /* Remove italic */
    font-weight: 500;
    display: inline-flex; /* Changed to inline-flex for better logo alignment */
    align-items: center; /* Center align logo with text */
    gap: 6px; /* Add space between elements */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.beekee-logo {
    height: 16px;
    width: auto;
    vertical-align: middle;
    margin: 0; /* Remove any default margins */
}

/* Features section - moved above workflow */
.features-section {
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Force 4 columns */
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: #0033a0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    color: white;
    font-size: 24px;
}

.feature-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.feature-description {
    color: #666;
    line-height: 1.5;
    font-size: 0.95em;
}

.workflow-section {
    margin-bottom: 50px;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 10px;
}

.section-subtitle {
    color: #666;
    font-size: 1.1em;
}

/* Initial Setup Note Styles */
.initial-setup-note {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-left: 4px solid #007bff;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0 30px 0;
}

.setup-note-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #004085;
    font-size: 1.1em;
}

.setup-note-header i {
    color: #007bff;
    font-size: 1.2em;
}

.initial-setup-note p {
    margin: 0;
    color: #004085;
    line-height: 1.6;
}

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.workflow-step {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    min-height: 300px; /* Ensure consistent minimum height */
}

.workflow-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-color: #0033a0;
}

.step-number {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #0033a0; /* Updated color */
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.step-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin: 10px 0 15px 0;
}

.step-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* This makes the description area grow to fill available space */
}

.step-action {
    display: inline-block;
    background: #0033a0; /* Updated color */
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin-top: auto; /* This pushes the button to the bottom */
    align-self: flex-start; /* Prevents button from stretching full width */
}

.step-action:hover {
    background: #002080; /* Darker shade for hover */
    color: white;
    text-decoration: none;
}

.tips-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 30px;
    margin: 40px 0;
}

.tips-section h3 {
    color: #856404;
    margin-top: 0;
    font-size: 1.4em;
}

.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    padding: 8px 0;
    color: #856404;
    position: relative;
    padding-left: 25px;
}

.tips-list li:before {
    content: "💡";
    position: absolute;
    left: 0;
    top: 8px;
}

.support-section {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 30px;
    margin: 40px 0;
    text-align: center;
}

.support-section h3 {
    color: #0c5460;
    margin-top: 0;
    font-size: 1.4em;
}

.support-section p {
    color: #0c5460;
    margin-bottom: 20px;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #24292e;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.github-link:hover {
    background: #1a1e22;
    color: white;
    text-decoration: none;
}

.github-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.multilang-note {
    background: #e2e3e5;
    border-left: 4px solid #6c757d;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
    font-style: italic;
    color: #495057;
}

/* Year-by-Year Workflow Section Styles */
.yearly-workflow-section {
    margin-bottom: 50px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 40px;
    border: 1px solid #e9ecef;
}

.yearly-intro {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1em;
    color: #495057;
    line-height: 1.6;
}

.yearly-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.yearly-step {
    background: white;
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.yearly-step:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.15);
    border-color: #1e7e34;
}

.yearly-step .step-number {
    background: #28a745;
    color: white;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.yearly-step .step-title {
    color: #1e7e34;
    font-weight: 700;
    margin-bottom: 15px;
}

.yearly-step .step-description {
    flex-grow: 1;
    margin-bottom: 15px;
}

.step-example {
    background: #e9f7ef;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #155724;
}

.step-note {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    color: #004085;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-note i {
    color: #007bff;
}

.yearly-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.note-icon {
    color: #856404;
    font-size: 1.5em;
    margin-top: 2px;
}

.note-content {
    color: #856404;
    line-height: 1.6;
}

.yearly-benefits {
    background: white;
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}

.yearly-benefits h4 {
    color: #155724;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    color: #495057;
    line-height: 1.5;
}

.benefits-list li i {
    color: #28a745;
    margin-top: 2px;
    font-size: 1.1em;
    flex-shrink: 0;
}

/* Responsive design */
@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }
}

@media (max-width: 768px) {
    .beekee-getting-started {
        padding: 10px;
    }
    
    .beekee-header {
        padding: 25px;
        text-align: center; /* Center on mobile */
    }
    
    .beekee-header h1 {
        font-size: 2em;
        text-align: center;
    }
    
    .beekee-header p {
        text-align: center;
    }
    
    .workflow-steps {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    /* Yearly workflow mobile styles */
    .yearly-workflow-section {
        padding: 25px 20px;
    }
    
    .yearly-steps {
        grid-template-columns: 1fr;
    }
    
    .yearly-step {
        min-height: auto;
        padding: 20px;
    }
    
    .yearly-note {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .note-icon {
        align-self: center;
    }

    /* Initial setup note mobile styles */
    .initial-setup-note {
        padding: 15px;
        margin: 15px 0 25px 0;
    }
    
    .setup-note-header {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

/* Additional Features Section */
.additional-features-section {
    margin: 40px 0;
    padding: 0 20px;
}

.additional-features-grid {
    display: grid;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.additional-feature-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #e74c3c;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Blue variant for non-destructive features */
.additional-feature-card.blue {
    border-left-color: #3498db;
}

.additional-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.additional-feature-card .feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    float: left;
    margin-right: 20px;
}

.additional-feature-card.blue .feature-icon {
    background: linear-gradient(135deg, #3498db, #1f69a8);
}

.additional-feature-card .feature-icon i {
    color: white;
    font-size: 24px;
}

.additional-feature-card h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.4em;
    font-weight: 600;
}

.additional-feature-card p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.feature-methods {
    margin: 20px 0;
    clear: both;
}

.feature-methods .method {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #e74c3c;
}

.additional-feature-card.blue .feature-methods .method {
    border-left-color: #3498db;
}

.feature-methods .method strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.feature-methods .method p {
    margin: 0;
    font-size: 0.95em;
    color: #666;
}

.feature-safety {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-safety i {
    color: #155724;
    font-size: 18px;
}

.feature-safety span {
    color: #155724;
    font-weight: 500;
    font-size: 0.95em;
}

.feature-action {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.feature-action:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* Blue variant buttons inside blue feature cards */
.additional-feature-card.blue .feature-action {
    background: linear-gradient(135deg, #3498db, #1f69a8);
}

.additional-feature-card.blue .feature-action:hover {
    background: linear-gradient(135deg, #1f69a8, #165786);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

@media (max-width: 480px) {
    .beekee-header h1 {
        font-size: 1.8em;
    }
    
    .workflow-step {
        padding: 20px;
    }
    
    .additional-feature-card {
        padding: 20px;
    }
    
    .additional-feature-card .feature-icon {
        float: none;
        margin: 0 auto 15px auto;
    }
} 