/* ======================================
   Top Navigation Component Styles
   ====================================== */

.top-nav {
  background-color: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.top-nav.sticky-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1030;
}

.top-nav-spacer {
  height: 64px;
}

.top-nav-mobile-right {
  display: none;
}

.top-nav-mobile-toggle {
  color: var(--brand-primary-text);
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  text-decoration: none;
}

.top-nav-mobile-toggle:hover,
.top-nav-mobile-toggle:focus {
  color: #111;
  text-decoration: none;
}

.top-nav-mobile-toggle::after {
  display: none;
}

.top-nav-mobile-menu {
  min-width: 280px;
}

.top-nav-mobile-menu .dropdown-header {
  font-size: 13px;
  font-weight: 700;
  color: #5a5f66;
}

.copy-link-alert {
  position: absolute;
  z-index: 1065;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(25, 135, 84, 0.95);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.copy-link-alert-share {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.email-confirmation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(17, 24, 39, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.email-confirmation-modal {
  width: min(560px, 100%);
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  padding: 24px;
}

.email-confirmation-title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.email-confirmation-copy {
  margin: 0 0 16px;
  color: #374151;
  white-space: pre-line;
}

.email-confirmation-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.email-confirmation-actions .btn {
  min-width: 220px;
}

@media (max-width: 576px) {
  .email-confirmation-modal {
    padding: 18px;
  }

  .email-confirmation-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

.top-nav-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(0, 0, 0, 0.34);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px;
}

.top-nav-modal {
  position: relative;
  width: min(520px, 100%);
  background: #ffffff;
  color: #2f3540;
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  padding: 20px 20px 18px;
  border-top: 5px solid #424242;
}

.top-nav-modal.modal-success {
  border-top-color: var(--bs-success);
}

.top-nav-modal.modal-error {
  border-top-color: var(--bs-danger);
}

.top-nav-modal.modal-confirm {
  border-top-color: var(--bs-primary);
}

.top-nav-modal.modal-client-albums {
  width: min(700px, 100%);
  border-top-color: var(--bs-primary);
}

.top-nav-modal.modal-renewal-path {
  width: min(840px, 100%);
  border-top-color: var(--bs-danger);
}

.top-nav-modal.modal-free-album-limit {
  width: min(620px, 100%);
  border-top-color: var(--bs-danger);
}

.free-limit-album-row {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #fafafa;
}

.free-limit-album-count-box {
  width: 96px;
  min-width: 96px;
  height: 96px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bs-danger-text-emphasis);
  background: var(--bs-danger);
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
}

.free-limit-album-info {
  min-width: 0;
  flex: 1;
}

.free-limit-album-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--bs-danger-text-emphasis);
  white-space: normal;
  margin-bottom: 6px;
}

.renewal-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 6px;
}

.renewal-path-column {
  padding: 14px;
  border: 1px solid #e4e6eb;
  border-radius: 10px;
  background: #fafbfc;
}

@media (max-width: 767px) {
  .renewal-path-grid {
    grid-template-columns: 1fr;
  }
}

.client-album-list {
  margin-top: 14px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.client-album-row {
  display: flex;
  gap: 14px;
  padding: 10px;
  border: 1px solid #dde7e0;
  border-radius: 10px;
  background: #fbfdfb;
}

.client-album-row + .client-album-row {
  margin-top: 10px;
}

.client-album-cover-col {
  width: 112px;
  min-width: 112px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #eff3ef;
}

.client-album-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.client-album-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6d7470;
  font-size: 12px;
  font-weight: 600;
}

.client-album-info-col {
  flex: 1;
  min-width: 0;
}

.client-album-name {
  font-size: 15px;
  font-weight: 700;
  color: #23422f;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-album-meta {
  margin-top: 2px;
  color: #4f6556;
  font-size: 13px;
}

.top-nav-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #6c757d;
  font-size: 28px;
  line-height: 1;
}

.top-nav-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-right: 24px;
}

.top-nav-modal-body {
  font-size: 15px;
  line-height: 1.55;
  color: #495057;
}

.top-nav-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.top-slide-modal-enter-active,
.top-slide-modal-leave-active {
  transition: opacity 220ms ease;
}

.top-slide-modal-enter-active .top-nav-modal,
.top-slide-modal-leave-active .top-nav-modal {
  transition: transform 260ms cubic-bezier(0.22, 0.8, 0.24, 1), opacity 260ms ease;
}

.top-slide-modal-enter-from,
.top-slide-modal-leave-to {
  opacity: 0;
}

.top-slide-modal-enter-from .top-nav-modal,
.top-slide-modal-leave-to .top-nav-modal {
  transform: translateY(-28px);
  opacity: 0;
}

.top-nav .btn-group .btn,
.logout-btn {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  white-space: nowrap;
  border-color: #dee2e6;
  color: #666;
  transition: all 0.2s ease;
}
.top-nav .add-album-btn {
  color: var(--brand-primary);
  font-weight: 700;
  background-repeat: repeat-x;
  border-color: #3e8f3e;
  border-bottom-color: #398A39;
  border-top-color: #5EBE5E;
  border-radius: 4px;
  margin-right: 8px;
  text-transform: uppercase;
  text-wrap: nowrap;
  min-height: 39px;
}
.top-nav .add-album-btn i {
  margin-right: 6px;
}
.top-nav .add-album-btn:hover:not(:disabled) {
  color: var(--brand-primary);
  background: #398A39;
  box-shadow: none;
}
.top-nav .btn-group .btn:hover,
.top-nav .btn-group .btn:focus {
  background-color: var(--text-bg-light);
  border-color: var(--brand-primary-dark);
  color: var(--brand-primary-text);
}

.top-nav .btn-group .btn.active {
  background-color: var(--brand-primary-dark);
  color: var(--brand-primary-text);
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}

.top-nav .btn-group .btn i {
  margin-right: 6px;
}

/* Center: Banti Logo */
.banti-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

/* Right: User Profile Dropdown */
.top-nav-desktop-right {
  align-items: center;
}

.language-switch-btn {
  color: var(--brand-primary-text);
  font-weight: 500;
  padding: 6px 10px;
  font-size: 14px;
  text-decoration: none;
  border: none;
}

.language-switch-btn:hover {
  color: var(--brand-primary-text);
  text-decoration: none;
}

.language-switch-btn::after {
  margin-left: 4px;
}

.language-dropdown-menu {
  min-width: 180px;
}

.language-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-flag {
  font-size: 14px;
  line-height: 1;
}

.language-label {
  display: inline-block;
}

.language-check {
  margin-left: auto;
  font-size: 12px;
}

.user-profile-btn {
  color: var(--brand-primary-text);
  font-weight: 500;
  padding: 6px 12px;
  font-size: 14px;
  text-decoration: none;
  border: none;
}

.user-profile-btn:hover {
  color: var(--brand-primary-text);
  text-decoration: none;
}

.user-profile-btn::after {
  margin-left: 6px;
}

.user-profile-btn i {
  margin-right: 6px;
  font-size: 18px;
}

/* Dropdown Menu Styling */
.top-nav .dropdown-menu {
  min-width: 280px;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  padding: 8px 0;
}

.top-nav .dropdown-item {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--brand-primary-text);
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.top-nav .dropdown-item:last-child {
  border-bottom: none;
}

.top-nav .dropdown-item strong {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 3px;
  color: #222;
}

.top-nav .dropdown-item small {
  display: block;
  color: #999;
  font-style: italic;
  font-size: 12px;
}

.top-nav .dropdown-item:hover {
  background-color: var(--text-bg-light);
  color: var(--brand-primary-text);
}

.top-nav .dropdown-item:hover strong {
  color: var(--brand-primary-text);
}

.top-nav .dropdown-divider {
  margin: 6px 0;
  opacity: 0.5;
}

.top-nav .my-albums-dropdown .dropdown-item {
  white-space: normal;
}

.top-nav .my-albums-dropdown .dropdown-item small {
  margin-top: 2px;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
  .top-nav-spacer {
    height: 58px;
  }

  .top-nav .container-fluid {
    flex-wrap: wrap;
  }

  .top-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    width: 100%;
    gap: 6px;
  }

  .top-nav-desktop-left {
    display: flex !important;
    order: 1;
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    align-items: center;
    gap: 6px;
  }

  .top-nav-desktop-right {
    display: flex !important;
    order: 2;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    margin-left: auto;
    align-items: center;
  }

  .top-nav-logo-wrap {
    display: none !important;
  }

  .top-nav-desktop-left .btn-toolbar {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-nav-desktop-left .btn-toolbar::-webkit-scrollbar {
    display: none;
  }

  .top-nav-desktop-left .btn-group {
    width: auto;
    margin-bottom: 0;
    display: inline-flex;
    white-space: nowrap;
  }

  .top-nav-desktop-left .btn-group .btn {
    flex: 0 0 auto;
    min-width: 36px;
    padding: 8px 10px;
  }

  .top-nav-desktop-left .btn-group .btn i {
    margin-right: 0;
  }

  .top-nav-add-label,
  .top-nav-link-label {
    display: none;
  }

  .top-nav .add-album-btn {
    margin-right: 0 !important;
    padding: 8px 10px;
    min-width: 36px;
    width: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .top-nav .add-album-btn i {
    margin-right: 0;
  }

  .banti-logo {
    height: 24px;
    margin: 0;
  }

  .user-profile-btn {
    font-size: 12px;
    padding: 4px 8px;
    white-space: nowrap;
  }

  .language-switch-btn {
    font-size: 12px;
    padding: 4px 8px;
  }

  .user-profile-btn i {
    font-size: 16px;
    margin-right: 4px;
  }

  .top-nav .dropdown-menu {
    min-width: 240px;
  }

  .client-album-row {
    gap: 10px;
  }

  .client-album-cover-col {
    width: 84px;
    min-width: 84px;
    height: 58px;
  }

  .free-limit-album-count-box {
    width: 84px;
    min-width: 84px;
    height: 58px;
    font-size: 24px;
  }
}
