/* Custom CSS for Drupal Profile Page Dynamic Blocks */
/* Note: Replace placeholder selectors (e.g., .block-calendar-custom) with actual selectors from your Drupal site. */

/* --- General Block Styling & Background Removal --- */
.profile-section-dynamic-block,
/* Add a common class to your dynamic blocks if possible */
.block-calendar-custom,
.recorded-cours,
.block-upcoming-events,
.block-daily-courses,
.block-recent-files {
    background-color: transparent !important;
    /* Remove unwanted backgrounds */
    border: 1px solid #e0e0e0;
    /* Softer border for separation */
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 15px;
    /* Softer radius */
    font-family: 'Vazirmatn', var(--default-font-family);
}

/* --- Titles --- */
.block-calendar-custom .calendar-title,
.recorded-cours .block-title,
.block-upcoming-events .block-title,
.block-daily-courses .block-title,
.block-recent-files .recent-files-title h3,
.block-calendar-custom .view-header h2 {
    font-family: 'Vazirmatn', var(--default-font-family);
    font-size: 22px;
    /* Adjusted size */
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: right;
}

.block-calendar-custom .calendar-subtitle-arabic {
    font-size: 14px;
    color: #555;
    display: block;
    text-align: right;
    margin-bottom: 10px;
}

.block-daily-courses .section-subtitle p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    text-align: right;
}

/* --- 1. Calendar Block ("Calendrier des cours") --- */
.block-calendar-custom .calendar-navigation {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Allow wrapping on smaller screens */
}

.block-calendar-custom .calendar-navigation .btn-group .btn,
.block-calendar-custom .calendar-navigation .today-button {
    font-family: 'Vazirmatn', var(--default-font-family);
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    color: #333;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 0 3px;
    /* Spacing between buttons */
    transition: background-color 0.3s ease;
}

.block-calendar-custom .calendar-navigation .btn-group .btn:hover,
.block-calendar-custom .calendar-navigation .today-button:hover {
    background-color: #e0e0e0;
}

.block-calendar-custom .calendar-navigation .btn-group .btn.active,
/* For active view toggle */
.block-calendar-custom .calendar-navigation .btn-primary

/* If Bootstrap primary is used */
    {
    background-color: #007bff;
    /* Example primary color */
    color: white;
    border-color: #007bff;
}

.block-calendar-custom table.calendar-grid {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
}

.block-calendar-custom table.calendar-grid th,
.block-calendar-custom table.calendar-grid td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    font-size: 14px;
}

.block-calendar-custom table.calendar-grid th {
    background-color: #f8f9fa;
    font-weight: 500;
}

.block-calendar-custom table.calendar-grid td.highlighted-day,
.block-calendar-custom table.calendar-grid td.fc-today

/* Common FullCalendar class */
    {
    background-color: #fff3cd;
    /* Softer yellow */
    font-weight: bold;
}

/* --- 2. Registered Courses Block ("Les cours enregistrés") --- */
/* CSS for Redesigned "Fichiers récents importés" List */
/* Targets: .recorded-cours .view-content .file */

/* Container for the entire "Fichiers récents importés" section */
/* Assuming .recorded-cours .view-content is the direct parent of .file items */
.recorded-cours .view-content {
    background-color: transparent !important;
    /* Remove any existing background */
    padding: 15px;
    /* Add some padding to the overall container if needed */
}

/* Styling for each individual file item */
.recorded-cours .view-content .file {
    display: flex;
    /* Use flexbox for internal alignment */
    align-items: center;
    /* Vertically center items */
    background-color: #ffffff;
    /* Clean white background for each item */
    border: 1px solid #e0e0e0;
    /* Subtle border */
    border-radius: 8px;
    /* Rounded corners */
    padding: 15px 20px;
    /* Internal padding */
    margin-bottom: 15px;
    /* Space between file items */
    font-family: 'Vazirmatn', var(--default-font-family), sans-serif;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    /* For potential absolute positioning of elements if needed */

    gap: 15px;
}

.recorded-cours .view-content .file:hover {
    border-color: #c0c0c0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Assuming the structure within .file might be: */
/* <div class="file-icon-type"> [PDF Icon] </div> */
/* <div class="file-info"> */
/*   <span class="file-name">Name</span> */
/*   <span class="file-date">Date</span> */
/* </div> */
/* <a class="file-download-icon"> [Download Icon] </a> */

/* Placeholder for a file type icon (e.g., PDF icon) */
/* You'll need to ensure your Drupal View outputs a wrapper for this */
.recorded-cours .view-content .file .file-icon-type {
    margin-left: 15px;
    /* RTL: Space to the left of the icon */
    margin-right: 0;
    /* RTL */
    flex-shrink: 0;
    /* Prevent icon from shrinking */
    display: flex;
    align-items: center;
}

.recorded-cours .view-content .file .file-icon-type img {
    width: 24px;
    /* Adjust size as needed */
    height: auto;
}

/* Container for file name and date */
.recorded-cours .view-content .file .file-info {
    flex-grow: 1;
    /* Allow this section to take up available space */
    display: flex;
    flex-direction: column;
    /* Stack name and date vertically */
    text-align: right;
    /* RTL text alignment */
    margin-right: 15px;
    /* RTL: Space to the right of file info */
    margin-left: 15px;
    /* RTL: Space to the left of file info, before download icon */
}

.recorded-cours .view-content .file .file-name {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 4px;
    /* Space between name and date */
    line-height: 1.4;
}

.recorded-cours .view-content .file .file-date {
    font-size: 13px;
    color: #666666;
    line-height: 1.3;
}

/* Placeholder for a download icon/link */
/* You'll need to ensure your Drupal View outputs a wrapper for this */
.recorded-cours .view-content .file .file-download-icon {
    margin-right: 0;
    /* RTL: Space to the right of the icon */
    margin-left: auto;
    /* Push to the far left in RTL */
    flex-shrink: 0;
    /* Prevent icon from shrinking */
    display: flex;
    align-items: center;
}

.recorded-cours .view-content .file a .fa-download {
    width: 22px;
    /* Adjust size as needed */
    height: auto;
}

.recorded-cours .view-content .file a,
.recorded-cours .view-content .file a .fa-download {
    display: inline-block;
    padding: 5px;
    line-height: 1;
}

.recorded-cours .view-content .file a {
    position: relative;
    margin-right: auto;
}

/* General title for the section if it exists outside .view-content */
.recorded-cours>h2,
/* Example if title is direct child */
.recorded-cours>.block-title {
    font-family: 'Vazirmatn', var(--default-font-family), sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: right;
    background-color: transparent !important;
    padding: 0;
    border-bottom: 2px solid #3498db;
    /* Example accent */
    padding-bottom: 8px;
}

/* If the title "Fichiers récents importés" is within .recorded-cours but before .view-content */
.recorded-cours .section-title-fichiers-recents {
    /* Add this class to the title's wrapper if possible */
    font-family: 'Vazirmatn', var(--default-font-family), sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: right;
    background-color: transparent !important;
    padding: 0;
    border-bottom: 2px solid #3498db;
    /* Example accent */
    padding-bottom: 8px;
}



/* --- 3. Upcoming Events Section Title ("Des événements à venir") --- */
.block-upcoming-events .events-title-bar {
    background-color: transparent !important;
    /* Remove blue background */
    padding: 10px 0;
    margin-bottom: 10px;
}

.block-upcoming-events .events-title-bar h3 {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

/* --- 4. Today's Courses / Recent Files Block --- */
.block-recent-files {
    background-color: transparent !important;
    /* Ensure no blue background */
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

.block-recent-files ul.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.block-recent-files ul.file-list li.file-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}

.block-recent-files ul.file-list li.file-item:last-child {
    border-bottom: none;
}

.block-recent-files .file-item .file-icon img {
    width: 24px;
    /* Adjust as needed */
    height: 24px;
    margin-left: 10px;
    /* RTL: icon on the right, so margin-left */
}

.block-recent-files .file-item .file-link {
    font-size: 15px;
    color: #007bff;
    text-decoration: none;
    flex-grow: 1;
    /* Allow text to take available space */
}

.block-recent-files .file-item .file-link:hover {
    text-decoration: underline;
}

.block-recent-files .file-item .file-date {
    font-size: 13px;
    color: #777;
    margin-right: 15px;
    /* RTL: space before date */
    white-space: nowrap;
}


/*** Header prfoile icon *****/

.button-profile-container {
    display: flex;
    width: 70px;
    height: 49px;
    padding: 5px 10px;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    border-radius: 43px;
    position: absolute;
    top: 19px;
    z-index: 13;
}

.profile-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-image: url('../images/icons/profile-user.svg');
    /* Relative to CSS file */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.button-profile .button-link {
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-profile .button-link:hover .profile-icon {
    opacity: 0.8;
}