// Telegram Tab Styles - Following existing settings pattern
.sf-settings-panel {
  .settings-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
  }

  .help-btn {
    &:hover {
      color: #0066aa !important;
    }
  }

  // Test button styles
  .test-telegram-btn {
    &:hover:not(:disabled) {
      background: linear-gradient(135deg, #218838, #1ea085) !important;
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    }

    &:disabled {
      opacity: 0.6;
      cursor: not-allowed !important;
      transform: none !important;
      box-shadow: none !important;
    }
  }

  // Setup Guide Styles
  .setup-guide {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    margin-top: 30px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);

    .guide-header {
      background: linear-gradient(135deg, #6f42c1, #8b5cf6);
      color: white;
      padding: 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;

      h4 {
        margin: 0;
        font-size: 1.2rem;
        font-weight: 600;
      }

      .close-guide-btn {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
        border-radius: 4px;
        transition: background 0.2s ease;

        &:hover {
          background: rgba(255, 255, 255, 0.2);
        }
      }
    }

    .guide-content {
      padding: 25px;
    }

    .guide-step {
      display: flex;
      gap: 20px;
      margin-bottom: 30px;
      padding-bottom: 25px;
      border-bottom: 1px solid #e9ecef;

      &:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
      }

      .step-number {
        flex-shrink: 0;
        width: 35px;
        height: 35px;
        background: linear-gradient(135deg, #0088cc, #229ed9);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 1.1rem;
      }

      .step-content {
        flex: 1;

        h5 {
          margin: 0 0 10px 0;
          color: #333;
          font-size: 1.1rem;
          font-weight: 600;
        }

        p {
          margin: 8px 0;
          line-height: 1.6;
          color: #555;
        }

        ol {
          margin: 10px 0;
          padding-left: 20px;

          li {
            margin: 5px 0;
            line-height: 1.5;
          }
        }

        .code-block {
          display: flex;
          align-items: center;
          gap: 10px;
          background: #f8f9fa;
          border: 1px solid #e9ecef;
          border-radius: 6px;
          padding: 12px 15px;
          margin: 10px 0;
          font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;

          code {
            flex: 1;
            background: none;
            padding: 0;
            font-size: 0.9rem;
            color: #495057;
          }

          .copy-btn {
            background: #6c757d;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 6px 8px;
            cursor: pointer;
            transition: background 0.2s ease;
            display: flex;
            align-items: center;

            &:hover {
              background: #5a6268;
            }

            svg {
              font-size: 0.9rem;
            }
          }
        }

        .external-link {
          display: inline-flex;
          align-items: center;
          gap: 5px;
          color: #0088cc;
          text-decoration: none;
          font-weight: 500;
          margin: 10px 0;
          padding: 8px 12px;
          background: #e3f2fd;
          border-radius: 6px;
          transition: all 0.2s ease;

          &:hover {
            background: #bbdefb;
            text-decoration: none;
          }

          svg {
            font-size: 0.9rem;
          }
        }
      }
    }

    .guide-footer {
      background: #f8f9fa;
      padding: 20px 25px;

      .info-box {
        display: flex;
        gap: 12px;
        align-items: flex-start;
        padding: 15px;
        background: #fff3cd;
        border: 1px solid #ffeaa7;
        border-radius: 8px;
        color: #856404;

        svg {
          color: #f39c12;
          flex-shrink: 0;
          margin-top: 2px;
        }

        strong {
          color: #856404;
        }
      }
    }
  }

  input#telegram-bot-token {
      width: 100%;
      padding: 0.75rem 1rem;
      border: 1px solid #e9ecef;
      border-radius: 8px;
      transition: all 0.3s ease;
  }

  // Feature Preview Styles
  .feature-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    border: 2px solid #e9ecef;

    h4 {
      margin: 0 0 20px 0;
      color: #333;
      font-size: 1.1rem;
      font-weight: 600;
    }

    .preview-message {
      background: white;
      border-radius: 10px;
      padding: 20px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .telegram-message {
      .message-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid #e9ecef;

        .telegram-logo {
          color: #0088cc;
          font-size: 1.2rem;
        }

        span {
          font-weight: 600;
          color: #333;
        }
      }

      .message-content {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        font-size: 0.95rem;
        line-height: 1.6;
        color: #333;

        code {
          background: #f1f3f4;
          padding: 2px 6px;
          border-radius: 4px;
          font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
          font-size: 0.85rem;
        }

        strong {
          font-weight: 600;
        }
      }
    }
  }
}

// Animation for spinner
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

// Responsive Design
@media (max-width: 768px) {
  .telegram-tab-content {
    padding: 15px;

    .telegram-header {
      flex-direction: column;
      text-align: center;
      gap: 10px;
    }

    .setting-group .input-with-help {
      flex-direction: column;

      .form-input {
        width: 100%;
      }
    }

    .setup-guide .guide-step {
      flex-direction: column;
      gap: 15px;

      .step-number {
        align-self: flex-start;
      }
    }
  }
}