/* Enhanced Tab and Button Styles for Clickability */

/* Enhance tab clickability */
.Polaris-Tabs__Tab {
  cursor: pointer !important;
  z-index: 100 !important;
  position: relative !important;
  pointer-events: all !important;
}

/* Make active tab more visible */
.Polaris-Tabs__Tab--selected {
  background-color: #f4f6f8 !important;
  border-bottom: 3px solid #5c6ac4 !important;
  font-weight: bold !important;
}

/* Fix for Tab focus */
.Polaris-Tabs__Tab:focus-visible {
  outline: 2px solid #458fff !important;
  outline-offset: 1px !important;
}

/* Ensure tab wrapper doesn't block clicks */
.Polaris-Tabs__Wrapper {
  position: relative;
  z-index: 100;
  pointer-events: auto !important; /* CHANGED: from 'none' to 'auto' */
}

/* But enable pointer events for the actual tabs */
.Polaris-Tabs__Wrapper .Polaris-Tabs {
  pointer-events: all;
}

/* Make buttons more clickable with higher specificity */
.Polaris-Button,
button.Polaris-Button {
  cursor: pointer !important;
  position: relative !important;
  z-index: 50 !important;
  pointer-events: auto !important;
}

/* Add hover effect to make buttons more obvious */
.Polaris-Button:hover,
button.Polaris-Button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* Add active effect to make buttons feel more responsive */
.Polaris-Button:active,
button.Polaris-Button:active {
  transform: translateY(1px);
  transition: all 0.1s ease;
}

/* Ensure all clickable elements have proper pointer cursor */
[role="button"],
[type="button"],
[type="submit"],
a.Polaris-Link,
.clickable {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* App-specific styles */

/* Styles for folder tab layout */
.Polaris-Tabs-container {
  padding: 0 !important;
  margin-bottom: 12px !important;
}

.Polaris-Tabs-container .Polaris-Card {
  box-shadow: 0 2px 5px rgba(33, 43, 54, 0.1) !important;
}

/* Improve tab appearance with folder tab styling */
.Polaris-Tabs__Tab:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: transparent;
  border-radius: 3px 3px 0 0;
  transition: background-color 0.2s ease;
}

.Polaris-Tabs__Tab--selected:before {
  background-color: #5c6ac4; /* Polaris primary color */
}

/* Tab content styling for folder tab aesthetic */
.Polaris-Card--subdued {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .Polaris-Tabs__Tab {
    min-width: 80px !important;
    padding: 8px 12px !important;
  }
}

/* Ensure proper display on top tab when in card context */
.Polaris-Card .Polaris-Tabs-container {
  margin: -20px -20px 20px -20px !important;
}

/* Strengthen tab appearance to look like folder tabs */
.Polaris-Tabs__Tab {
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05) !important;
}

.Polaris-Tabs__Tab--selected {
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Extra tab styling for classic folder tab feel */
.Polaris-Tabs__Tab {
  position: relative;
  font-weight: 500;
}

.Polaris-Tabs__Tab:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: transparent;
}

.Polaris-Tabs__Tab--selected:after {
  background: #fff;
}