/* ================================
   PROFILE DROPDOWN
   ================================ */

/* Dropdown Container */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: var(--pearl-white);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
}

.profile-dropdown--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown__container {
  padding: 16px;
}

/* User Section */
.profile-dropdown__user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.profile-dropdown__avatar-wrapper {
  flex-shrink: 0;
}

.profile-dropdown__avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--imperial-purple) 0%, var(--deep-plum) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-dropdown__initials {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--pearl-white);
  text-transform: uppercase;
}

.profile-dropdown__status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border: 2px solid var(--pearl-white);
  border-radius: 50%;
}

.profile-dropdown__user-info {
  flex: 1;
  min-width: 0;
}

.profile-dropdown__name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--velvet-black);
  margin: 0 0 6px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-dropdown__link {
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  font-size: 12px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.profile-dropdown__link:hover {
  opacity: 0.7;
}

.profile-dropdown__link--primary {
  color: var(--imperial-purple);
}

.profile-dropdown__link--logout {
  color: #dc2626;
}

/* Divider */
.profile-dropdown__divider {
  height: 1px;
  background-color: #e5e5e5;
  margin: 12px 0;
}

/* Occasions Section */
.profile-dropdown__occasions {
  margin-top: 12px;
}

.profile-dropdown__section-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--velvet-black);
  margin: 0 0 14px 0;
  line-height: 1;
}

/* Occasion Card */
.profile-dropdown__occasion-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f3f3f3;
}

.profile-dropdown__occasion-card:first-child {
  padding-top: 0;
}

.profile-dropdown__occasion-card:last-of-type {
  border-bottom: none;
}

/* Occasion Content */
.profile-dropdown__occasion-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-dropdown__date-text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: var(--imperial-purple);
  margin: 0;
  line-height: 1.2;
}

.profile-dropdown__person-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--velvet-black);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.profile-dropdown__occasion-type {
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

/* Browse Link */
.profile-dropdown__browse-link {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  color: var(--imperial-purple);
  text-decoration: underline;
  white-space: nowrap;
  transition: opacity 0.2s ease;
  line-height: 1.2;
  align-self: flex-start;
  padding-top: 2px;
}

.profile-dropdown__browse-link:hover {
  opacity: 0.7;
}

/* View All Link */
.profile-dropdown__view-all {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: var(--imperial-purple);
  text-decoration: none;
  margin-top: 16px;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  line-height: 1;
}

.profile-dropdown__view-all:hover {
  background-color: #f9f5ff;
}

/* Wrapper for positioning dropdown relative to profile button */
.header__profile-wrapper {
  position: relative;
  align-items: center;
  /* Note: display is controlled by header.css via .header__icon-btn--desktop */
}

/* ================================
   GUEST STATE (LOGGED OUT)
   ================================ */

.profile-dropdown__guest {
  text-align: center;
  padding: 8px 0;
}

.profile-dropdown__guest-text {
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  font-size: 13px;
  color: #666666;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.profile-dropdown__login-btn {
  width: 100%;
  height: 44px;
  background-color: var(--imperial-purple);
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.profile-dropdown__login-btn:hover {
  background-color: var(--deep-plum);
}

.profile-dropdown__signup-text {
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  font-size: 12px;
  color: #999999;
  margin: 12px 0 0 0;
}

.profile-dropdown__signup-link {
  color: var(--imperial-purple);
  text-decoration: none;
  font-weight: 400;
}

.profile-dropdown__signup-link:hover {
  text-decoration: underline;
}

/* ================================
   RTL (RIGHT-TO-LEFT) SUPPORT
   ================================ */

[dir="rtl"] .profile-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .profile-dropdown__user {
  flex-direction: row-reverse;
}

[dir="rtl"] .profile-dropdown__occasion-content {
  text-align: right;
}

[dir="rtl"] .profile-dropdown__status-indicator {
  right: auto;
  left: 2px;
}

[dir="rtl"] .profile-dropdown__name,
[dir="rtl"] .profile-dropdown__person-name,
[dir="rtl"] .profile-dropdown__occasion-type {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  text-align: right;
}

[dir="rtl"] .profile-dropdown__link,
[dir="rtl"] .profile-dropdown__section-title,
[dir="rtl"] .profile-dropdown__date-text,
[dir="rtl"] .profile-dropdown__browse-link,
[dir="rtl"] .profile-dropdown__view-all {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}

/* ================================
   TABLET AND DESKTOP (950px+)
   ================================ */
@media (min-width: 950px) {
  .profile-dropdown {
    width: 340px;
  }

  .profile-dropdown__container {
    padding: 18px;
  }

  .profile-dropdown__avatar {
    width: 44px;
    height: 44px;
  }

  .profile-dropdown__initials {
    font-size: 16px;
  }

  .profile-dropdown__name {
    font-size: 15px;
  }

  .profile-dropdown__link {
    font-size: 13px;
  }

  .profile-dropdown__section-title {
    font-size: 15px;
  }

  .profile-dropdown__date-text {
    font-size: 14px;
  }

  .profile-dropdown__person-name {
    font-size: 14px;
  }

  .profile-dropdown__occasion-type {
    font-size: 13px;
  }

  .profile-dropdown__browse-link {
    font-size: 13px;
  }

  .profile-dropdown__view-all {
    font-size: 14px;
  }
}
