.goftyar-widget {
  position: fixed;
  z-index: 999999;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.3s ease;
  width: max-content;
  box-sizing: border-box;
}

.goftyar-widget * {
  box-sizing: border-box;
}

.goftyar-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Positions */
.goftyar-pos-bottom-right {
  bottom: 25px;
  right: 25px;
  align-items: flex-end;
}

.goftyar-pos-bottom-left {
  bottom: 25px;
  left: 25px;
  align-items: flex-start;
}

/* Button Wrapper */
.goftyar-button-wrap {
  position: relative;
  z-index: 10;
  margin-top: 10px;
}

.goftyar-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50px;
  border: 2px solid #6366f1;
  opacity: 0;
  animation: goftyar-pulse-animation 2s infinite;
  z-index: -1;
  pointer-events: none;
}

.goftyar-button.is-icon + .goftyar-pulse-ring {
  border-radius: 50%;
}

/* Main Button */
.goftyar-button {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.goftyar-button:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* State Management */
.goftyar-btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.goftyar-state-open {
  position: relative;
  opacity: 1;
  transform: scale(1);
}

.goftyar-state-close {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg) scale(0);
  opacity: 0;
}

.goftyar-widget.is-active .goftyar-state-open {
  opacity: 0;
  transform: scale(0);
}

.goftyar-widget.is-active .goftyar-state-close {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0) scale(1);
}

/* Button Type: Text */
.goftyar-button.is-text {
  padding: 12px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  gap: 8px;
  white-space: nowrap;
  min-width: 60px;
  height: 60px;
}

.goftyar-widget.is-active .goftyar-button.is-text {
  width: 60px;
  padding: 0;
  border-radius: 50%;
}

.goftyar-button.is-text .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Button Type: Icon */
.goftyar-button.is-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid #fff;
}

.goftyar-button.is-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
