/* WhatsApp Form Container */
.whatsapp-form-container {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 8px;
}

/* WhatsApp Form */
.whatsapp-form {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 128, 0, 0.3); /* Adjusted shadow opacity */
    max-width: 540px;
    margin: 0 auto;
}

/* Form Heading */
.whatsapp-form h1 {
    font-size: 1.8rem;
    text-align: center;
    color: #25D366; /* WhatsApp green */
    margin-bottom: 20px;
}

/* Form Labels */
.whatsapp-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #075E54; /* WhatsApp dark green */
}

/* Form Inputs */
.whatsapp-form input,
.whatsapp-form select,
.whatsapp-form textarea,
#category {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fff;
    color: #333;
}

/* Info Box for Logo */
#group-logo {
    color: #075E54;
    background-color: transparent;
    border: 1px solid #707070; /* WhatsApp green dotted border */
    border-radius: 8px;
    padding: 14px;
    margin-top: 15px; /* Adjusted margin for spacing consistency */
    display: block;
}

/* Text for Size Info */
#size {
    text-align: right;
    color: red;
    font-size: 16px;
    margin-top: -8px; /* Adjusted margin for better alignment */
    margin-right: 18px;
}

/* Toggle Switch (Modern with WhatsApp Colors) */
.switch {
    margin-top: 12px;
    position: relative;
    display: inline-block;
    width: 70px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #25D366;
}

input:checked + .slider:before {
    transform: translateX(36px);
}

input:focus + .slider {
    box-shadow: 0 0 1px #25D366;
}

.slider:after {
    content: 'OFF';
    color: red;
    display: block;
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 70%;
    font-size: 12px;
    opacity: 1;
    transition: color 0.4s; /* Reduced transition time for responsiveness */
}

input:checked + .slider:after {
    color: white !important;
    content: 'ON';
    left: 25%;
    transition: color 0s;
}

#div1 {
    margin-top: 20px;
}

/* Submit Button */
.whatsapp-form input[type="submit"] {
    display: block;
    border-radius: 40px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    color: #FFFFFF;
    text-align: center;
    font-weight: 600;
    padding: 12px 20px;
    width: 200px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 16px auto;
    background-size: 200% 200%;
    animation: gradient-animation 3s ease infinite;
}

@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.whatsapp-form input[type="submit"]:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
    background-size: 200% 200%;
    animation: gradient-hover-animation 0.4s ease forwards;
}

@keyframes gradient-hover-animation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .whatsapp-form {
        max-width: 90%; /* Adjust width for smaller screens */
    }
}

/*STYLE START for whatsapp-group-showing-container*/

/* Container for Show WhatsApp groups */
.whatsapp-group-container {
    border: 10px;
    margin-top: 3vh;
    margin-right: 2vh;
    margin-left: 2vh;
    margin-bottom: 3vh;
}

/* Group Showing Container heading */
.whatsapp-group-container h1 {
    font-size: 2rem;
    margin-right: 2vh;
    margin-left: 2vh;
    border: 2px solid #007bff; /* Change border color for better visibility */
    padding: 12px; /* Slightly increased padding */
    text-align: center;
    color: darkblue;
    background-color: #e7f0ff; /* Light background for contrast */
    border-radius: 5px; /* Rounded corners */
}

.whatsapp-group-container #submissionDataContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}


/* Group card style */
.whatsapp-group-container .group-info {
    background-color: #ffffff; /* Changed to white for a cleaner look */
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Softer shadow for subtlety */
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    border: 1px solid #ccc; /* Light border for definition */
}

.whatsapp-group-container .group-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Increased shadow on hover */
}

.group-logo {
    background-size: cover; /* Ensures the logo covers the div */
    background-position: center; /* Center the logo */
    display: inline-block; /* Ensures it behaves like an image */
    position: relative; /* Establishes a positioning context */
    overflow: hidden; /* Ensures no overflow */
}

.group-logo img {
    width: 100%; /* Makes sure the image takes the full width of the container */
    height: 100%; /* Makes sure the image takes the full height of the container */
    object-fit: cover; /* Ensures the image covers the div while maintaining aspect ratio */
    position: absolute; /* Positioning to cover the parent div */
    top: 0; /* Align to top */
    left: 0; /* Align to left */
    z-index: 1; /* Bring the image above the background */
}

.group-logo:after {
    content: ""; /* Creates a pseudo-element */
    background-image: url('nologo.png'); /* Default no Logo */
    background-size: cover; /* Ensures the logo covers the div */
    background-position: center; /* Center the logo */
    background-color: #1ebea4;
    position: absolute; /* Position it absolutely */
    top: 0; /* Align to top */
    left: 0; /* Align to left */
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    z-index: 0; /* Send the background to the back */
}

/* Group name */
.group-info h3 {
    font-weight: 700; /* Bold text */
    text-align: center;
    color: #007bff; /* A brighter blue */
    margin: 10px 10; /* Added margin for spacing */
}

/* Group logo */
.group-info .group-logo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin: 40px auto 15px; /* Centering logo */
    border-radius: 100% !important; /* Circle shape */
    border: 2px solid #25D366; /* Slightly thicker border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Softer shadow for depth */
    transition: transform 0.3s; /* Add transition for hover effect */
}

.group-info .group-logo:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
}

/* Join button */
.group-info .join-button {
    background-color: #00762c; /* Original green color */
    color: white !important; /* Text color */
    font-weight: 700; /* Bold text */
    padding: 10px 18px; /* Increased padding for better touch targets */
    border: none; /* No border */
    border-radius: 30px; /* Slightly reduced border-radius for a more modern look */
    text-decoration: none; /* No underline */
    display: inline-block; /* Display as inline block */
    font-size: 16px; /* Increased font size for better readability */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Added shadow for depth */
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s; /* Transition effects */
}

.group-info .join-button:hover {
    border: 1px solid black;
    background-color: #09ae46; /* Softer green for hover effect */
    transform: translateY(-3px); /* Slight lift effect on hover */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

.group-info .join-button:active {
    transform: translateY(1px); /* Press effect */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Reduced shadow on press */
}


/* New badge */
.group-info .new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff0000;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Added shadow for depth */
}

/* Category badge */
.group-info .category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #005eff;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Added shadow for depth */
}


/* Popup Container after successful submit*/

/* Overlay */
.overlay {
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255 255 255 / 30%);
    backdrop-filter: blur(5px);
    z-index: 999; /* Below the popup */
    animation: fadeOverlay 0.3s ease; /* Overlay fade-in effect */
}

.popup {
    display: none; /* Initially hidden */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%; /* Responsive width */
    max-width: 260px; /* Max width for larger screens */
    max-height: 80vh; /* Max height for mobile devices */
    background: #fefefe; /*  white background */
    border-radius: 12px; /* Slightly more rounded corners */
    padding: 30px; /* Increased padding for better spacing */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35); /* Softer shadow for depth */
    z-index: 1000;
    animation: fadeIn 0.8s ease, bounce 1s ease-out; /* Fade-in and bounce effects */
    overflow-y: auto; /* Enable scrolling if needed */
    transition: opacity 0.3s ease; /* Smooth transition for appearance */
}

/* Card Styling */
.popup-content {
    text-align: center;
}

/* Close Button */
.close-popup {
    display: none;
    padding: 6px 12px; /* Slightly larger padding */
    background-color: #f44336; /* Red color for close */
    color: #ffffff;
    border: none;
    border-radius: 25px; /* More rounded for a friendlier look */
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s, transform 0.2s; /* Add transform transition */
    margin-top: 15px; /* Space above the button */
}

.close-popup:hover {
    background-color: #c62828; /* Darker red on hover */
    transform: translateY(-2px); /* Subtle lift on hover */
}

.close-popup:focus {
    outline: 2px solid #128C7E; /* Focus outline for accessibility */
}

.success-message {
    font-size: 1rem;
    color: #128C7E;
    margin: 10px 0 20px;
}

/* GIF */
.success-gif {
    border-radius: 100%;
    width: 240px; /* Adjust size for visibility */
    height: auto; /* Maintain aspect ratio */
    margin: 0 auto 10px; /* Center the GIF and space below */
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.85;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(-50%) translateX(-50%);
    }
    40% {
        transform: translateY(-52%) translateX(-50%);
    }
    60% {
        transform: translateY(-48%) translateX(-50%);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .popup {
        padding: 20px; /* Reduce padding for smaller screens */
    }

    .close-popup {
        font-size: 0.9rem; /* Slightly smaller close button */
        padding: 10px 18px; /* Adjust padding */
    }

    .success-message {
        font-size: 0.9rem; /* Smaller message font */
    }
}

.no-groups-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    border: 1px solid #e0e0e0; /* Light border for subtle framing */
    border-radius: 10px; /* Rounded corners */
    background-color: #fff; /* White background for clarity */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
    margin: 20px; /* Margin for spacing */
    transition: transform 0.3s; /* Smooth hover effect */
}

.no-groups-message:hover {
    transform: scale(1.02); /* Slightly enlarge on hover */
}

.no-groups-icon {
    width: 100px; /* Icon width */
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 20px; /* Spacing below the icon */
}

.no-groups-message p {
    color: red !important;
    font-weight: bold;
}

.no-groups-text {
    font-size: 20px; /* Larger font size for emphasis */
    color: #555; /* Darker gray text color */
    font-weight: 600; /* Medium font weight for prominence */
    margin: 0; /* Reset margin */
}

/* Optional: Add some animation for a more dynamic feel */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.no-groups-message {
    animation: fadeIn 0.5s ease-in; /* Fade in effect */
}