/**
 * Simple Contact Bar
 *
 * @wordpress-plugin
 * Plugin Name: Simple Contact Bar
 * Version:     1.0.5
 * Plugin URI:  https://wordpress.org/plugins/simple-contact-bar/
 * Description: Simple Contact Bar plugin: is an easy-to-use plugin that adds a call now and whatsapp message button to sites created with Wordpress infrastructure. In addition to fully customizable buttons, it has the feature of directing the visitor to communicate with the popup.
 * Tags:        click to call, call now, call me now, call now button, click to call bar, call button, whatsapp button, text from whatsapp, whatsapp text button, popup contact buttons
 * Author:      Tuncay TEKE
 * Author URI:  https://tuncayteke.com.tr
 * Contributors: tuncayteke
 * Donate link: https://profiles.wordpress.org/tuncayteke/
 * Text Domain: simple-contact-bar
 * Domain Path: /languages/
 * Requires at least:  5.4.0
 * Tested up to: 6.6.1
 * Requires PHP: 7.1
 *
 * WC requires at least: 8.1
 * WC tested up to: 9.1.4
 *
 * License: GPL2+ or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.txt
 */

/* Base Styles */
:root {
  --scb-primary-color: #177cc7;
  --scb-whatsapp-color: #229000;
  --scb-text-color: #ffffff;
  --scb-border-color: #ffffff;
  --scb-shadow-color: rgba(0, 0, 0, 0.2);
  --scb-popup-bg: #ffffff;
  --scb-popup-text: #000000;
  --scb-popup-border: #e2e2e2;
  --scb-transition-speed: 0.3s;
}

html, body {
  overflow-x: hidden !important;
}

/* Contact Bar Container */
.scb-contact-bar {
  z-index: 999999;
  text-decoration: none;
  height: auto;
  max-width: 45%;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible;
  position: absolute;
}

.scb-contact-bar::after {
  content: "";
  clear: both;
  display: table;
}

/* Button Base Styles */
.scb-contact-bar a,
.scb-button {
  display: flex;
  justify-content: flex-start;
  flex-direction: row;
  margin-bottom: 0;
  text-align: center;
  align-items: center;
  white-space: nowrap;
  vertical-align: middle;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
  cursor: pointer;
  background-image: none;
  padding: 1rem;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.8rem;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: inherit;
  line-height: inherit;
  text-transform: none;
  overflow: visible;
  text-decoration: none !important;
  height: 2rem;
  width: auto;
  max-height: 3.5rem !important;
  text-overflow: ellipsis;
  text-align: center;
  transition: all var(--scb-transition-speed) ease;
  position: relative;
}

/* Button Styles */
.scb-button-flat-square {
  border-radius: 0;
}

.scb-button-radius-square {
  border-radius: 5px;
}

.scb-button-circle {
  border-radius: 50px !important;
}

/* Button Text */
.scb-contact-bar .scb-button-text,
.scb-contact-bar.scb-button-text,
.scb-contact-bar a.scb-button-text,
.scb-contact-bar a .scb-button-text,
.scb-contact-bar a.span,
.scb-contact-bar a .span,
.scb-button-text {
  margin: 0 0.25rem;
  vertical-align: middle;
  position: relative;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  text-decoration: none;
}

/* Button SVG */
.scb-contact-bar svg,
.scb-contact-bar a svg,
.scb-contact-bar a .scb-button svg,
.scb-contact-bar .scb-button svg,
.scb-button svg {
  position: relative;
  align-content: center;
  justify-content: flex-start;
  flex-shrink: 0;
  fill: currentColor;
  transition: transform var(--scb-transition-speed);
  margin: 0.5rem 0.25rem !important;
  display: table-cell;
  vertical-align: middle;
  height: auto;
  width: auto;
  max-height: 2.5rem !important;
  max-width: 2.5rem !important;
}

.scb-contact-bar a:hover svg,
.scb-contact-bar a:hover .scb-button svg,
.scb-contact-bar .scb-button:hover svg,
.scb-button:hover svg {
  transform: rotate(15deg);
}

/* Sürekli animasyon için */
.scb-button-icon-animation svg {
  animation: scb-pulse 1s infinite;
}

/* Button Sizes */
.scb-button.scb-button-sm,
.scb-button .scb-button-sm,
.scb-button-sm {
  padding: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.5rem;
}

.scb-button.scb-button-md,
.scb-button .scb-button-md,
.scb-button-md {
  padding: 0.35rem;
  font-size: 1rem;
  line-height: 1.75rem;
}

.scb-button.scb-button-lg,
.scb-button .scb-button-lg,
.scb-button-lg {
  padding: 0.5rem;
  font-size: 1.25rem;
  line-height: 2rem;
}

.scb-button.scb-button-xl,
.scb-button .scb-button-xl,
.scb-button-xl {
  padding: 0.75rem;
  font-size: 1.5rem;
  line-height: 2.25rem;
}

.scb-button.scb-button-xxl,
.scb-button .scb-button-xxl,
.scb-button-xxl {
  padding: 1rem;
  font-size: 1.75rem;
  line-height: 2.5rem;
}

/* Button SVG Sizes */
.scb-button.scb-button-sm svg,
.scb-button .scb-button-sm svg,
.scb-button-sm svg {
  height: 1.1rem !important;
  width: auto !important;
}

.scb-button.scb-button-md svg,
.scb-button .scb-button-md svg,
.scb-button-md svg {
  height: 1.5rem !important;
  width: auto !important;
}

.scb-button.scb-button-lg svg,
.scb-button .scb-button-lg svg,
.scb-button-lg svg {
  height: 1.75rem !important;
  width: auto !important;
}

.scb-button.scb-button-xl svg,
.scb-button .scb-button-xl svg,
.scb-button-xl svg {
  height: 2rem !important;
  width: auto !important;
}

.scb-button.scb-button-xxl svg,
.scb-button .scb-button-xxl svg,
.scb-button-xxl svg {
  height: 2.25rem !important;
  width: auto !important;
}

/* Only Icon SVG Sizes - Override for better centering */
.scb-only-icon.scb-button-sm svg {
  height: 1.5rem !important;
  width: 1.5rem !important;
}

.scb-only-icon.scb-button-md svg {
  height: 1.7rem !important;
  width: 1.7rem !important;
}

.scb-only-icon.scb-button-lg svg {
  height: 1.9rem !important;
  width: 1.9rem !important;
}

.scb-only-icon.scb-button-xl svg {
  height: 2.1rem !important;
  width: 2.1rem !important;
}

.scb-only-icon.scb-button-xxl svg {
  height: 2.3rem !important;
  width: 2.3rem !important;
}

/* Default Button Colors */
#scb-phone-button, #scb-popup-phone-button {
  color: var(--scb-text-color);
  background-color: var(--scb-primary-color);
  box-shadow: 0 2px 5px var(--scb-shadow-color);
}

#scb-whatsapp-button, #scb-popup-whatsapp-button {
  color: var(--scb-text-color);
  background-color: var(--scb-whatsapp-color);
  box-shadow: 0 2px 5px var(--scb-shadow-color);
}

/* Button Hover Effects */
#scb-phone-button:hover,
#scb-whatsapp-button:hover,
#scb-popup-phone-button:hover,
#scb-popup-whatsapp-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--scb-shadow-color);
}

/* Fix for button animation */
a.scb-button-animation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  animation: scb-ripple-effect 1.5s ease-out infinite;
  z-index: -1;
  opacity: 0.7;
  background-color: transparent;
  pointer-events: none;
  box-sizing: border-box;
}

@keyframes scb-ripple-effect {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
    transform: scale(0.95);
  }
  70% {
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    transform: scale(0.95);
  }
}

@keyframes scb-button-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* Button Positions */
/* Bottom */
.scb-bottom-right {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
}

.scb-bottom-left {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
}

.scb-bottom-center {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
}

/* Center */
.scb-center-left {
  position: fixed;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.scb-center-right {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Top */
.scb-top-left {
  position: fixed;
  top: 1rem;
  left: 1rem;
}

.scb-top-right {
  position: fixed;
  top: 1rem;
  right: 1rem;
}

.scb-top-center {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
}

/* Icon Only Button */
.scb-only-icon {
  height: auto !important;
  width: auto !important;
  min-height: 2.5rem !important;
  min-width: 2.5rem !important;
  text-align: center;
  justify-content: center;
  align-items: center;
  padding: 0.5rem !important;
  display: flex !important;
}

.scb-only-icon svg {
  display: block !important;
  margin: auto !important;
  height: 100% !important;
  width: 100% !important;
  max-height: 1.5rem !important;
  max-width: 1.5rem !important;
}

/* Button Size Adjustments for Icon Only */
.scb-button-sm.scb-only-icon {
  height: 2.5rem !important;
  min-height: 2.5rem !important;
  max-height: 2.5rem !important;
  width: 2.5rem !important;
  min-width: 2.5rem !important;
  max-width: 2.5rem !important;
  padding: 0.5rem !important;
}

.scb-button-md.scb-only-icon {
  height: 3rem !important;
  min-height: 3rem !important;
  max-height: 3rem !important;
  width: 3rem !important;
  min-width: 3rem !important;
  max-width: 3rem !important;
  padding: 0.25rem !important;
}

.scb-button-lg.scb-only-icon {
  height: 3.5rem !important;
  min-height: 3.5rem !important;
  max-height: 3.5rem !important;
  width: 3.5rem !important;
  min-width: 3.5rem !important;
  max-width: 3.5rem !important;
  padding: 0.35rem;
}

.scb-button-xl.scb-only-icon {
  height: 4rem !important;
  min-height: 4rem !important;
  max-height: 4rem !important;
  width: 4rem !important;
  min-width: 4rem !important;
  max-width: 4rem !important;
  padding: 0.35rem;
}

.scb-button-xxl.scb-only-icon {
  height: 4.5rem !important;
  min-height: 4.5rem !important;
  max-height: 4.5rem !important;
  width: 4.5rem !important;
  min-width: 4.5rem !important;
  max-width: 4.5rem !important;
  padding: 0.5rem;
}

/* Animations */
.scb-button-icon-animation svg {
  animation: scb-pulse 1s infinite;
}

a.scb-button-animation {
  position: relative;
  z-index: 1;
  overflow: hidden !important;
  isolation: isolate;  
  -webkit-animation: scb-ripple 0.6s linear infinite;
  animation: scb-ripple 0.6s linear infinite;
}

@keyframes scb-pulse {
  0% {
    transform: scale(0.9);
  }
  50% {
    transform: scale(1);
  }
  100% {
    transform: scale(0.9);
  }
}

@-webkit-keyframes scb-ripple {
  0% {
    -webkit-box-shadow: 0 4px 10px rgba(99, 107, 115, 0.1),
      0 0 0 0 rgba(99, 107, 115, 0.1), 0 0 0 5px rgba(99, 107, 115, 0.1),
      0 0 0 10px rgba(99, 107, 115, 0.1);
    box-shadow: 0 4px 10px rgba(99, 107, 115, 0.1),
      0 0 0 0 rgba(99, 107, 115, 0.1), 0 0 0 5px rgba(99, 107, 115, 0.1),
      0 0 0 10px rgba(99, 107, 115, 0.1);
  }

  100% {
    -webkit-box-shadow: 0 4px 10px rgba(99, 107, 115, 0.1),
      0 0 0 5px rgba(99, 107, 115, 0.1), 0 0 0 10px rgba(99, 107, 115, 0.1),
      0 0 0 20px rgba(99, 107, 115, 0);
    box-shadow: 0 4px 10px rgba(99, 107, 115, 0.1),
      0 0 0 5px rgba(99, 107, 115, 0.1), 0 0 0 10px rgba(99, 107, 115, 0.1),
      0 0 0 20px rgba(99, 107, 115, 0);
  }
}

@keyframes scb-ripple {
  0% {
    -webkit-box-shadow: 0 4px 10px rgba(99, 107, 115, 0.1),
      0 0 0 0 rgba(99, 107, 115, 0.1), 0 0 0 5px rgba(99, 107, 115, 0.1),
      0 0 0 10px rgba(99, 107, 115, 0.1);
    box-shadow: 0 4px 10px rgba(99, 107, 115, 0.1),
      0 0 0 0 rgba(99, 107, 115, 0.1), 0 0 0 5px rgba(99, 107, 115, 0.1),
      0 0 0 10px rgba(99, 107, 115, 0.1);
  }

  100% {
    -webkit-box-shadow: 0 4px 10px rgba(99, 107, 115, 0.1),
      0 0 0 5px rgba(99, 107, 115, 0.1), 0 0 0 10px rgba(99, 107, 115, 0.1),
      0 0 0 20px rgba(99, 107, 115, 0);
    box-shadow: 0 4px 10px rgba(99, 107, 115, 0.1),
      0 0 0 5px rgba(99, 107, 115, 0.1), 0 0 0 10px rgba(99, 107, 115, 0.1),
      0 0 0 20px rgba(99, 107, 115, 0);
  }
}

/* Layout Containers */
.scb-grid {
  display: grid !important;
  justify-content: center;
  align-content: center;
  align-items: center;
  justify-items: stretch;
}

.scb-gab {
  gap: 0.5rem !important;
  align-content: space-between;
  justify-content: center;
  justify-items: center;
  padding: 1rem !important;
}

.scb-gab a {
  position: static;
}

.scb-inline {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  text-align: center;
  align-items: center;
  margin: auto;
  justify-content: center;
}

/* Popup Styles */
.scb-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  backdrop-filter: blur(3px);
}

.scb-popup-content {
  min-width: 300px;
  max-width: 60%;
  background-color: var(--scb-popup-bg);
  border-radius: 10px;
  padding: 25px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--scb-shadow-color);
  animation: scb-popup-fade-in 0.3s ease-out;
}

@keyframes scb-popup-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scb-popup-header {
  padding-bottom: 15px;
  text-align: center;
}

.scb-popup-header h2 {
  margin-top: 0;
  font-size: 1.8rem;
}

.scb-popup-scrollable-content {
  max-height: 200px;
  overflow-y: auto;
  padding: 15px 5px;
  text-decoration: none !important;
  text-align: center;
  margin-bottom: 15px;
  line-height: 1.6;
}

.scb-popup-footer,
.scb-popup-footer-buttons {
  margin-top: 20px;
  text-align: center;
  text-decoration: none;
}

.scb-popup-footer-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.scb-popup-footer-buttons a {
  visibility: visible;
  position: relative !important;
  margin: 0.5rem;
  flex: 1;
  min-width: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.scb-popup-footer-buttons .scb-button{
	max-width:50%;
}

/* Ensure popup buttons inherit styles properly */
.scb-popup-footer-buttons #scb-popup-phone-button,
.scb-popup-footer-buttons #scb-popup-whatsapp-button {
  width: 100%;
  height: auto;
  min-height: 40px;
}

.scb-popup-close-button {
  position: absolute;
  padding: 10px;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.scb-popup-close-button:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.scb-popup-footer {
  margin-top: 30px;
  font-size: 0.9rem;
}

.scb-popup-footer label {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.scb-popup-footer input[type="checkbox"] {
  margin-right: 8px;
}

/* Scrollbar Styling */
.scb-popup-scrollable-content::-webkit-scrollbar {
  width: 8px;
}

.scb-popup-scrollable-content::-webkit-scrollbar-track {
  background-color: #f1f1f1;
  border-radius: 4px;
}

.scb-popup-scrollable-content::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}

.scb-popup-scrollable-content::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .scb-popup-content {
    min-width: 75%;
    max-width: 90%;
    padding: 20px;
  }
  
  .scb-popup-footer-buttons {
    flex-direction: column;
  }
  
  .scb-popup-footer-buttons a {
    margin: 0.25rem;
  }
  
  .scb-contact-bar {
    max-width: 50%;
  }
}

@media screen and (max-width: 480px) {
  .scb-contact-bar {
    max-width: 70%;
  }
  
  .scb-popup-content {
    padding: 15px;
  }
  
  .scb-popup-header h2 {
    font-size: 1.5rem;
  }
}

article .scb-button{
	max-width:250px !important
}