// Import Telegram styles
@import 'telegram';

// Variables
$primary-color: #4a6cf7;
$secondary-color: #6c757d;
$success-color: #28a745;
$error-color: #dc3545;
$background-color: #f8f9fa;
$card-bg-color: #ffffff;
$border-color: #e9ecef;
$text-color: #343a40;
$text-muted: #6c757d;
$shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
$shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
$shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
$border-radius: 8px;
$transition-speed: 0.3s;

// Main container styles
.acb_bottom {
  background-color: $background-color;
  padding: 1.5rem;
  border-radius: $border-radius;
  display: flex;
  min-height: 600px;

  .acb_left {
    background-color: $card-bg-color;
    border-radius: $border-radius;
    box-shadow: $shadow-md;
    width: 100%;
    display: flex;
    overflow: hidden;
  }
}

// Tab Headers
.tab-headers {
  width: 250px;
  background-color: #f5f7fa;
  padding: 1.5rem 0;
  border-right: 1px solid $border-color;
  display: flex;
  flex-direction: column;

  .tab-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: $text-color;
    font-weight: 500;
    transition: all $transition-speed ease;
    cursor: pointer;
    position: relative;

    &:hover {
      background-color: rgba($primary-color, 0.05);
      color: $primary-color;
    }

    &.active {
      background-color: rgba($primary-color, 0.1);
      color: $primary-color;
      font-weight: 600;

      &::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
        background-color: $primary-color;
      }
    }

    .TabIcon {
      margin-right: 0.75rem;
      font-size: 1.25rem;
    }
  }

  .horizontal-line {
    height: 1px;
    background-color: $border-color;
    margin: 0.5rem 1.5rem;
    opacity: 0.5;

    &:nth-child(3),
    &:nth-child(7),
    &:nth-child(8) {
      margin: 0.25rem 1.5rem;
    }
  }

  .setings-submit-btn {
    margin-top: auto;
    background-color: $primary-color;
    color: white;
    border-radius: $border-radius;
    margin: 1.5rem;
    text-align: center;
    justify-content: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: $shadow-sm;
    transition: all $transition-speed ease;

    &:hover {
      background-color: darken($primary-color, 10%);
      box-shadow: $shadow-md;
      transform: translateY(-2px);
    }
  }
}

// Tab Content
.tab-content {
  flex: 1;
  padding: 2rem;
  display: none;
  overflow-y: auto;

  &.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
  }

  .review-case-title,
  h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: $text-color;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba($primary-color, 0.1);
  }
}


button.theme-tab {
  padding: 10px 14px;
  background-color: rgba(74, 108, 247, 0.1);
  color: #4a6cf7;
  border-radius: 8px;
  margin-right: 10px;
  text-align: center;
  justify-content: center;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  gap: 5px;
}

// Settings Panel
.sf-settings-panel,
.cache-panel,
.form-theme {

  .floating-widgets,
  .form-customization,
  .settings-panel {
    background-color: #fff;
    border-radius: $border-radius;
    padding: 1.5rem;
  }

  .wpnts-switch-review {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba($border-color, 0.5);

    &:last-child {
      border-bottom: none;
    }

    .form-feature-heading {
      font-weight: 500;
      color: $text-color;
      flex: 1;
    }

    .NEW_TAG {
      background-color: $primary-color;
      color: white;
      padding: 0.25rem 0.5rem;
      border-radius: 4px;
      font-size: 0.75rem;
      font-weight: 600;
      margin-right: 0.75rem;
    }
  }

  .formInput {
    margin-bottom: 1.5rem;

    .form-feature-sub-heading {
      display: block;
      margin-bottom: 0.5rem;
      font-weight: 500;
      color: $text-color;
    }

    input[type="text"] {
      width: 100%;
      padding: 0.75rem 1rem;
      border: 1px solid $border-color;
      border-radius: $border-radius;
      transition: all $transition-speed ease;

      &:focus {
        outline: none;
        border-color: $primary-color;
        box-shadow: 0 0 0 3px rgba($primary-color, 0.2);
      }
    }
  }

  .seperationLine {
    margin: 1.5rem 0;

    hr {
      border: 0;
      height: 1px;
      background-color: $border-color;
    }
  }
}

// Theme Selection
.form-theme {
  .theme-description {
    line-height: 1.6;
    color: $text-muted;
    margin-bottom: 2rem;

    .tip-highlight {
      color: $primary-color;
      font-weight: 600;
    }

    .code-example {
      background-color: #f5f7fa;
      padding: 0.25rem 0.5rem;
      border-radius: 4px;
      font-family: monospace;
      margin: 0 0.25rem;
    }

    .tip-theme-list {
      font-style: italic;
    }
  }
}

// Captcha panel specific styles
.cache-panel {
  .cloudflare-get-key {
    display: flex;
    align-items: center;
    background-color: rgba($primary-color, 0.05);
    padding: 1rem;
    border-radius: $border-radius;
    margin-bottom: 1.5rem;

    .key-icon {
      color: $primary-color;
      margin-right: 0.75rem;
      font-size: 1.25rem;
    }

    a {
      color: $primary-color;
      text-decoration: none;
      font-weight: 500;

      &:hover {
        text-decoration: underline;
      }
    }
  }

  .ConnectCaptcha-btn {
    background-color: $primary-color;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: $border-radius;
    font-weight: 600;
    cursor: pointer;
    transition: all $transition-speed ease;
    margin-bottom: 1.5rem;

    &:hover {
      background-color: darken($primary-color, 10%);
      box-shadow: $shadow-sm;
    }
  }

  .ErrorMessage {
    background-color: rgba($error-color, 0.1);
    color: $error-color;
    padding: 1rem;
    border-radius: $border-radius;
    margin-bottom: 1.5rem;

    h5 {
      margin: 0;
      font-weight: 500;

      a {
        color: $error-color;
        text-decoration: underline;
      }
    }
  }

  .SuccessMessage {
    background-color: rgba($success-color, 0.1);
    color: $success-color;
    padding: 1rem;
    border-radius: $border-radius;
    margin-bottom: 1.5rem;

    h5 {
      margin: 0;
      font-weight: 500;
    }
  }
}

// Custom switch styling for toggle buttons
:root {
  --switch-width: 46px;
  --switch-height: 24px;
  --switch-padding: 2px;
  --switch-animation-duration: 0.3s;
}

/* ReactSwitchsupport and ReactSwitchreview component styling */
.react-switch-bg {
  border-radius: 100px;
  background-color: #1d2327;
  transition: all var(--switch-animation-duration) ease;

  &[style*="background-color: rgb(51, 153, 255)"] {
    background-color: $primary-color;
  }
}

.react-switch-handle {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

// Animations
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

// Responsive styles
@media (max-width: 768px) {
  .acb_left {
    flex-direction: column;
  }

  .tab-headers {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid $border-color;
  }

  .tab-content {
    padding: 1.5rem;
  }
}