/**
 * Sidebar Plan Widget
 * Displays the current subscription plan status in the sidebar footer
 */

/* ==================== */
/* Plan Widget Container */
/* ==================== */
.sidebar-plan-widget {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 0.5rem 1rem 1rem;
  background: var(--bs-menu-bg, #fff);
  z-index: 1;
}

/* ==================== */
/* Plan Card            */
/* ==================== */
.plan-card {
  height: 86px;
  background: linear-gradient(195deg, var(--plan-free-bg-1, #e8eeff) 45%, var(--plan-free-bg-2, #b9cbff) 100%);
  border-radius: 14px;
  width: 100%;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 65, 255, 0.15);
}

.plan-card:focus {
  outline: 2px solid var(--plan-free-color-1, #0041ff);
  outline-offset: 2px;
}

/* ==================== */
/* Plan Text            */
/* ==================== */
.plan-text {
  font-size: 0.875rem;
  text-align: center;
  color: var(--plan-free-color-2, #25324f);
  padding: 0;
  margin: 0;
  line-height: 1.5;
}

.plan-type {
  font-weight: 700;
  color: var(--plan-free-color-1, #0041ff);
}

/* ==================== */
/* Upgrade Button       */
/* ==================== */
.plan-button-wrapper {
  padding: 0 0.75rem;
}

.plan-upgrade-btn {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  border-radius: 14px;
  width: 100%;
  padding: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--plan-free-button-bg, #fff);
  color: var(--plan-free-button-color, #000);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.plan-upgrade-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.02);
}

.plan-upgrade-btn:hover .plan-btn-icon {
  transform: translateX(-8px);
}

.plan-upgrade-btn:focus {
  outline: 2px solid var(--plan-free-color-1, #0041ff);
  outline-offset: 2px;
}

/* ==================== */
/* Button Icon          */
/* ==================== */
.plan-btn-icon {
  width: 16px;
  height: 12px;
  transition: transform 0.3s ease;
  color: var(--plan-free-button-color, #000);
}

/* ==================== */
/* Collapsed Sidebar    */
/* ==================== */
.layout-menu-collapsed .sidebar-plan-widget {
  display: none;
}

.layout-menu-collapsed:not(.layout-menu-hover) .menu-has-plan-widget .menu-inner {
  padding-bottom: 1rem !important;
}

.layout-menu-collapsed.layout-menu-hover .sidebar-plan-widget {
  display: block;
  padding: 0.5rem 1rem 1rem;
}

/* ==================== */
/* Menu Inner Padding   */
/* ==================== */
.menu-has-plan-widget .menu-inner {
  padding-bottom: 110px !important;
}

/* ==================== */
/* Responsive Styles    */
/* ==================== */
@media (max-width: 1199.98px) {
  .sidebar-plan-widget {
    position: relative;
    padding: 1rem;
    margin-top: auto;
  }
  
  .menu-has-plan-widget .menu-inner {
    padding-bottom: 1rem !important;
  }
}

/* Mobile Sidebar Open State */
@media (max-width: 767.98px) {
  .sidebar-plan-widget {
    padding: 0.75rem 1rem 1rem;
  }
  
  .plan-card {
    height: auto;
    min-height: 80px;
  }
}

/* ==================== */
/* Dark Mode Support    */
/* ==================== */
[data-theme="dark"] .plan-card,
.dark-style .plan-card {
  --plan-free-bg-1: #1a2744;
  --plan-free-bg-2: #2e4268;
  --plan-free-color-1: #8ba9ff;
  --plan-free-color-2: #b2bfdb;
  --plan-free-button-bg: #374b76;
  --plan-free-button-color: #fff;
}

[data-theme="dark"] .plan-upgrade-btn:hover,
.dark-style .plan-upgrade-btn:hover {
  background: #48639c;
}
