/* Custom styles for Pabna Pourashava */

/* Make widget titles and other titles relative for absolute positioning */
.widget__title {
    width: 100%;
    position: relative;
}

/* Edit icon - shown when logged in as admin and setting is enabled */
.edit-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    color: #fff;
    text-decoration: none;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    opacity: 0.8;
}

/* Add padding to widget title to make room for edit icon on the left */
.widget__title:not(.center) {
    padding-left: 44px !important;
}

/* For centered titles, add right padding instead and position icon on right */
.widget__title.center {
    padding-right: 44px !important;
}

.widget__title.center .edit-icon {
    left: auto;
    right: 10px;
}

/* Show edit icon more prominently on hover */
.widget__title:hover .edit-icon {
    opacity: 1;
    background: rgba(59, 130, 246, 0.5);
    transform: translateY(-50%) scale(1.05);
}

/* Hide edit icons if disabled in settings */
.edit-icon-disabled {
    display: none !important;
}

.edit-icon:hover {
    color: #fff;
    background: rgba(59, 130, 246, 0.7);
    transform: translateY(-50%) scale(1.05);
}

.edit-icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* For page titles (h1, h2, etc.) that need edit icons */
h1.title-editable,
h2.title-editable,
h3.title-editable,
h4.title-editable {
    position: relative;
    display: inline-block;
    padding-left: 36px;
}

h1.title-editable .edit-icon,
h2.title-editable .edit-icon,
h3.title-editable .edit-icon,
h4.title-editable .edit-icon {
    left: 0;
    display: inline-flex;
}

h1.title-editable:hover .edit-icon,
h2.title-editable:hover .edit-icon,
h3.title-editable:hover .edit-icon,
h4.title-editable:hover .edit-icon {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Active menu item styles */
.main-menu ul li.active > a,
.main-menu ul li.menu-item-has-children.active > a {
    color: #3b82f6;
    font-weight: 600;
}

.main-menu .sub-menu li.active > a {
    color: #3b82f6;
    font-weight: 600;
}

/* Member photo size limits */
.profile-card__image,
.member-details__image {
    max-width: 300px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Banner image slider adjustments */
.banner__item {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.banner__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner__content {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    max-width: min(70%, 520px);
}

.banner__title {
    margin: 0 0 6px;
    font-size: clamp(16px, 1.5vw, 20px);
    font-weight: 400;
    line-height: 1;
    margin-bottom: 0;
}

.banner__description {
    margin: 0;
    font-size: clamp(13px, 1.6vw, 18px);
    line-height: 1.5;
}

.banner__slider .swiper-button-prev,
.banner__slider .swiper-button-next {
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.banner__slider .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.75);
    opacity: 1;
}

.banner__slider .swiper-pagination-bullet-active {
    background: #ffffff;
}

/* Activity Timeline Styles */
.activity-widget .widget__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.activity-timeline {
    position: relative;
    padding-left: 31px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 2px;
    bottom: 2px;
    width: 2px;
    background: linear-gradient(180deg, #93c5fd 0%, #e5e7eb 100%);
}

.activity-item {
    position: relative;
    /* margin-bottom: 18px; */
    padding-bottom: 18px;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3b82f6;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px #bfdbfe;
}

.activity-item--assigned::before {
    background: #10b981;
    box-shadow: 0 0 0 2px #a7f3d0;
}

.activity-item--left::before {
    background: #ef4444;
    box-shadow: 0 0 0 2px #fecaca;
}

.activity-item__date {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: #1f2937;
    font-weight: 600;
    background: #eef2ff;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.activity-item__content {
    background: #ffffff;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.activity-item__type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3b82f6;
}

.activity-item__type--assigned {
    color: #059669;
    background: #ecfdf5;
}

.activity-item__type--assigned .material-symbols-outlined {
    color: #059669;
}

.activity-item__type--left {
    color: #dc2626;
    background: #fef2f2;
}

.activity-item__type--left .material-symbols-outlined {
    color: #dc2626;
}

.activity-item__type .material-symbols-outlined {
    font-size: 18px;
}

.activity-item__description {
    margin: 0;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.6;
}

.activity-item__designation {
    color: #6b7280;
    font-size: 13px;
    font-style: italic;
}

/*
 * Header + dropdown menus above main column widgets and sticky sidebars (sidebars use z-index: 8).
 */
.frontend-layout > .header {
    position: relative;
    z-index: 500;
}

.frontend-layout .header__menu.sticky {
    z-index: 1000;
}

.frontend-layout .header__nav .main-menu li > ul.sub-menu {
    z-index: 2000;
}

@media (max-width: 991px) {
    .frontend-layout .header__nav .main-menu {
        z-index: 1500;
    }
}

/*
 * Sticky sidebars: grid align-items:start (in style.css .main) keeps column boxes content-sized.
 * Also ensure no clipping ancestors; JS sets body.header-nav-sticky when .header__menu is fixed.
 */
.frontend-layout main > .container,
.frontend-layout main > .container > .main {
    overflow: visible !important;
}

@media (min-width: 768px) {
    .frontend-layout .main__sidebar.left,
    .frontend-layout .main__sidebar.right {
        position: -webkit-sticky;
        position: sticky;
        top: 1rem;
        align-self: start;
        z-index: 8;
    }

    /* Fixed nav offset (set by scripts.js + FrontendLayout scroll handler) */
    .frontend-layout.header-nav-sticky .main__sidebar.left,
    .frontend-layout.header-nav-sticky .main__sidebar.right {
        top: 4.5rem;
    }
}

/* Fallback when :has() is supported but body class missing */
body:has(.header__menu.sticky).frontend-layout .main__sidebar.left,
body:has(.header__menu.sticky).frontend-layout .main__sidebar.right {
    top: 4.5rem;
}

/* Member profile: office period / assignment list */
.member-period-list__item:not(:last-child) {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}
