/* SweetAlert2 Custom Styling - Shared across all pages */

/* Main Popup Styling */
.swal2-popup {
    border-radius: 15px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Title Styling */
.swal2-title {
    color: #25D366 !important;
    font-size: 20px !important;
    font-weight: bold !important;
    margin-bottom: 15px !important;
}

/* Content Styling */
.swal2-content {
    color: #333 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* Confirm Button Styling */
.swal2-confirm {
    background-color: #25D366 !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 10px 25px !important;
    font-weight: bold !important;
    font-size: 14px !important;
    color: white !important;
    transition: all 0.3s ease !important;
}

.swal2-confirm:hover {
    background-color: #128C7E !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3) !important;
}

/* Cancel Button Styling */
.swal2-cancel {
    background-color: #6c757d !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 10px 25px !important;
    font-weight: bold !important;
    font-size: 14px !important;
    color: white !important;
    transition: all 0.3s ease !important;
}

.swal2-cancel:hover {
    background-color: #5a6268 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3) !important;
}

/* Input Field Styling */
.swal2-input {
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
    font-size: 14px !important;
    transition: border-color 0.3s ease !important;
}

.swal2-input:focus {
    border-color: #25D366 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1) !important;
}

/* Select Field Styling */
.swal2-select {
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
    font-size: 14px !important;
    background-color: white !important;
    transition: border-color 0.3s ease !important;
}

.swal2-select:focus {
    border-color: #25D366 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1) !important;
}

/* Textarea Styling */
.swal2-textarea {
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
    font-size: 14px !important;
    resize: vertical !important;
    min-height: 100px !important;
    transition: border-color 0.3s ease !important;
}

.swal2-textarea:focus {
    border-color: #25D366 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1) !important;
}

/* Loading Animation */
.swal2-loader {
    border: 3px solid #f3f3f3 !important;
    border-top: 3px solid #25D366 !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Icon Styling */
.swal2-icon {
    border: 4px solid #25D366 !important;
}

.swal2-icon.swal2-success {
    border-color: #25D366 !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #25D366 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: #25D366 !important;
}

.swal2-icon.swal2-error {
    border-color: #dc3545 !important;
}

.swal2-icon.swal2-warning {
    border-color: #ffc107 !important;
}

.swal2-icon.swal2-info {
    border-color: #17a2b8 !important;
}

/* Custom Modal Content Styling */
.save-segment-modal {
    text-align: left !important;
    max-width: 400px;
    margin: 0 auto;
    padding: 0;
}

.save-segment-modal label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.save-segment-modal input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 18px;
    box-sizing: border-box;
    background: #f8f9fa;
}

.save-segment-modal .subgroups-list-container {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafbfc;
}

.save-segment-modal .subgroups-label {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
    color: #333;
}

.save-segment-modal .subgroups-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.save-segment-modal .subgroup-item {
    padding: 10px 14px;
    border-radius: 4px;
    color: #007bff;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-size: 15px;
    text-align: left;
    border: 1px solid transparent;
}

.save-segment-modal .subgroup-item:hover {
    background: #e9f5ff;
    color: #0056b3;
    border: 1px solid #b6e0fe;
}

.save-segment-modal .subgroup-item.selected {
    background: #007bff;
    color: #fff;
    font-weight: bold;
    border: 1px solid #007bff;
}

/* Progress Bar Styling */
.progress-container {
    width: 100%;
    margin: 10px 0;
}

.progress {
    height: 20px;
    margin-bottom: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    line-height: 20px;
    color: white;
    text-align: center;
    background-color: #25D366;
    transition: width 0.3s ease;
}

.progress-label {
    margin-bottom: 5px;
    font-weight: bold;
}

.status-message {
    margin-top: 10px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .swal2-popup {
        margin: 10px !important;
        width: calc(100% - 20px) !important;
    }
    
    .swal2-title {
        font-size: 18px !important;
    }
    
    .swal2-confirm,
    .swal2-cancel {
        padding: 8px 20px !important;
        font-size: 13px !important;
    }
} 

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.warning-message {
    animation: flash 1.5s infinite;
    color: #ff0000;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
    padding: 10px;
    background-color: #fff3cd;
    border: 2px solid #ffeeba;
    border-radius: 5px;
}

.warning-icon {
    font-size: 24px;
    vertical-align: middle;
}

.flash-warning {
    animation: flash 1.5s infinite;
    font-weight: bold;
    font-size: 16px;
    display: block;
    margin: 10px 0;
}
input{
    font-size:13px !important;
    min-width: 10px !important;
    border: 1px dashed lightgray !important;
    font-family: Tahoma, Geneva, sans-serif !important;
    background-color: white;
}
select{
    font-size:13px !important;
    border: 1px dashed lightgray !important;
    font-family: Tahoma, Geneva, sans-serif !important;
    background-color: white;
}
textarea{
    font-size:13px !important;
    min-width: 50px !important;
    min-height: 80px !important;
    border: 1px dashed lightgray !important;
    font-family: Tahoma, Geneva, sans-serif !important;
    background-color: white;
}

p{
    font-size:10px !important;
    font-family: Tahoma, Geneva, sans-serif;
}

label{
    font-size:12px !important;
    font-family: Tahoma, Geneva, sans-serif !important;
    color: black;
}
details> summary {
    cursor: pointer;
    position: relative;
    margin-left: 0px;
    display: list-item;
    margin-left: 1em;
}

.alert {
  padding: 20px;
  background-color: #f44336; /* Red */
  color: white;
  margin-bottom: 15px;
  opacity: 1;
  transition: opacity 0.6s; /* 600ms to fade out */
}
.info {
  padding: 20px;
  /*background-color: black;*/ /* Red */
  color: white;
  margin-bottom: 15px;
  opacity: 1;
  transition: opacity 0.6s; /* 600ms to fade out */
  border-radius: 100%;
  border-style: dotted;
  border-width: 4px;
}
/* The close button */
.closebtn {
  margin-left: 15px;
  color: white;
  font-weight: bold;
  float: right;
  font-size: 22px;
  line-height: 20px;
  cursor: pointer;
  transition: 0.3s;
}

/* When moving the mouse over the close button */
.closebtn:hover {
  color: black;
}
    /* Shrink font size and adjust button padding */
.btn-small {
font-size: 12px;  /* Smaller text size */
padding: 2px 5px; /* Reduce padding */
height: auto;     /* Adjust height to fit content */
}

/* Ensure icons fit nicely with smaller text */
.material-icons {
font-size: 16px;  /* Smaller icon size */
}

/* Add spacing between buttons to prevent overlap */
.row {
gap: 5px;  /* Ensure spacing between columns */
}

/* Style for the loading spinner */
.loading-icon {
display: flex;
justify-content: center;
align-items: center;
padding: 10px;
}

.spinner {
width: 24px;
height: 24px;
border: 4px solid #f3f3f3; /* Light grey */
border-top: 4px solid #25D366; /* WhatsApp green */
border-radius: 50%;
animation: spin 1s linear infinite;
}
/* Floating Chat Button (Like Wati.io) */
#chat-button-container {
position: fixed;
bottom: 20px;
right: 20px;
display: flex;
align-items: center;
z-index: 999;
cursor: pointer;
}

/* Chat Toggle Button */
#chat-toggle {
display: flex;
align-items: center;
background: #007bff;
color: white;
padding: 10px 15px;
border-radius: 50px;
font-weight: bold;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
}

#chat-toggle:hover {
background: #0056b3;
}

/* Chat Icon */
.chat-icon {
width: 40px;
height: 40px;
background: white;
color: #007bff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
margin-right: 8px;
transition: transform 0.3s ease;
}

/* Chat Notification Text */
.chat-notification {
font-size: 14px;
white-space: nowrap;
}

/* Floating Sidebar */
#floating-sidebar {
position: fixed;
bottom: 80px;
right: -250px; /* Hidden by default */
width: 240px;
background: white;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: right 0.3s ease-in-out;
z-index: 999;
display: none;
}

/* Sidebar Content */
#sidebar-content {
display: flex;
flex-direction: column;
align-items: center;
padding: 15px;
}

/* Sidebar Title */
.sidebar-title {
font-size: 16px;
font-weight: bold;
margin-bottom: 10px;
}

/* Sidebar Buttons */
.sidebar-btn {
display: flex;
align-items: center;
gap: 10px;
background: #f8f9fa;
color: black;
padding: 12px;
margin: 8px 0;
border-radius: 5px;
text-decoration: none;
font-weight: bold;
width: 100%;
transition: background 0.3s ease, transform 0.2s ease-in-out;
}

/* Remove Underline */
.sidebar-btn:hover,
.sidebar-btn:focus,
.sidebar-btn:active {
background: #e2e6ea;
text-decoration: none !important;
transform: scale(1.05);
}

/* Sidebar Icons */
.sidebar-icon {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
border-radius: 50%;
transition: transform 0.3s ease;
}

/* WhatsApp Icon */
.whatsapp-icon {
background: #25D366;
color: white;
}

/* Chatbot Icon */
.chatbot-icon {
background: #007bff;
color: white;
}

/* Icon Hover Animation */
.sidebar-icon:hover {
transform: rotate(360deg);
}

/* Close Button */
#close-sidebar {
background: #ff4747;
color: white;
font-size: 18px;
border: none;
border-radius: 50%;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-top: 10px;
}

#close-sidebar:hover {
background: #cc0000;
}

/* WhatsApp Promotional Popup Styles */
.whatsapp-promo-popup {
border-radius: 15px !important;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.whatsapp-promo-popup .swal2-title {
color: #25D366 !important;
font-size: 20px !important;
font-weight: bold !important;
margin-bottom: 20px !important;
}

.whatsapp-promo-popup .swal2-content {
color: #333 !important;
font-size: 14px !important;
}

.whatsapp-promo-popup .swal2-confirm {
background-color: #25D366 !important;
border: none !important;
border-radius: 25px !important;
padding: 10px 25px !important;
font-weight: bold !important;
font-size: 14px !important;
transition: all 0.3s ease !important;
}

.whatsapp-promo-popup .swal2-confirm:hover {
background-color: #128C7E !important;
transform: translateY(-2px) !important;
box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4) !important;
}

.whatsapp-promo-popup .swal2-icon.swal2-info {
border-color: #25D366 !important;
color: #25D366 !important;
}