/* General Body & Container for the form */



.whatsapp-join-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #25D366; /* WhatsApp Green */
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold; /* Optional: make text bolder */
    transition: background-color 0.3s ease; /* Optional: smooth hover effect */
}

.whatsapp-join-button:hover {
    background-color: #1DA851; /* Darker green on hover */
}

h1 {
    color: #25d366; /* WhatsApp green */
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 600;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #555;
}

label .required {
    color: #e74c3c; /* Red for required fields */
    margin-left: 5px;
}

input[type="url"],
input[type="text"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fdfdfd;
}

input[type="url"]:focus,
input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: #25d366;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85em;
}

button[type="submit"] {
    background-color: #25d366;
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

button[type="submit"]:hover {
    background-color: #1da851;
    transform: translateY(-2px);
}

/* Messages */
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.95em;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.95em;
}


/* WhatsApp Group Display List */
.whatsapp-groups-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    padding: 0 20px; /* Add some horizontal padding */
}

.whatsapp-group-item {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.whatsapp-group-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.group-image {
    width: 100%;
    height: 200px; /* Increased height for better visual */
    overflow: hidden;
    background-color: #e0e0e0; /* Default grey for missing image */
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.group-details {
    padding: 20px;
    flex-grow: 1; /* Allows details section to expand */
    display: flex;
    flex-direction: column;
}

.group-details h3 {
    margin-top: 0;
    color: #25d366;
    font-size: 1.4em;
    font-weight: 600;
    min-height: 50px; /* Ensure consistent height for titles across items */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit title to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-category {
    font-style: italic;
    color: #777;
    font-size: 0.9em;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.group-description {
    color: #555;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1; /* Allow description to take available space */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit description to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-buttons {
    margin-top: auto; /* Push buttons to the bottom */
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.join-button, .read-more-button {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 25px; /* Pill shape */
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    flex-grow: 1; /* Allow buttons to grow */
    white-space: nowrap; /* Prevent text wrapping within button */
}

.join-button {
    background-color: #25d366; /* WhatsApp green */
    color: white;
    border: 2px solid #25d366;
}

.join-button:hover {
    background-color: #1da851;
    border-color: #1da851;
    transform: translateY(-2px);
}

.read-more-button {
    background-color: #0073aa; /* WordPress blue */
    color: white;
    border: 2px solid #0073aa;
}

.read-more-button:hover {
    background-color: #005a87;
    border-color: #005a87;
    transform: translateY(-2px);
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        margin: 20px;
        padding: 25px;
    }

    .whatsapp-groups-list {
        grid-template-columns: 1fr; /* Single column on small screens */
        padding: 0 10px;
        gap: 25px;
    }

    h1 {
        font-size: 1.8em;
    }

    .group-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    button[type="submit"] {
        padding: 12px 20px;
        font-size: 1em;
    }

    .group-details h3 {
        font-size: 1.2em;
    }

    .join-button, .read-more-button {
        font-size: 0.85em;
        padding: 10px 15px;
    }
}
/*
Plugin Name: WhatsApp Group Manager
Description: Styles for the WhatsApp Group Manager plugin.
Version: 1.0.3
*/

/* General Styling for the WhatsApp Groups Section */
.whatsapp-groups-section {
    padding: 40px 20px;
    max-width: 1200px; /* Adjust max width of the section as needed */
    margin: 0 auto;
    font-family: Arial, sans-serif; /* Recommended font, adjust if your theme has a specific font */
    box-sizing: border-box; /* Include padding in element's total width and height */
}

.whatsapp-groups-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee; /* Optional separator below header */
    padding-bottom: 15px;
}

.whatsapp-groups-section .section-header h2 {
    font-size: 2.2em; /* "Top View" heading size */
    font-weight: bold;
    color: #333;
    margin: 0;
}

.whatsapp-groups-section .view-all-link {
    text-decoration: none;
    color: #007bff; /* Blue for "View All" link */
    font-weight: 600;
    padding: 8px 15px;
    border: 1px solid #007bff;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.whatsapp-groups-section .view-all-link:hover {
    background-color: #007bff;
    color: white;
}

/* Grid Layout for Group Cards */
.groups-grid {
    display: grid;
    /* Responsive grid: 4 columns normally, adjusts down */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px; /* Space between cards */
}

/* Styling for Individual Group Cards */
.group-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); /* Subtle shadow for depth */
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensures button is at the bottom */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%; /* Important for cards in a row to have equal height */
    box-sizing: border-box; /* Include padding in card's total dimensions */
}

.group-card:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); /* Enhanced shadow on hover */
}

.group-card .card-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: #777; /* Lighter text for meta info */
    font-size: 0.9em;
}

.group-card .region {
    font-weight: bold;
    color: #555;
}

.group-card .views {
    display: flex;
    align-items: center;
}

.group-card .views .eye-icon {
    margin-left: 5px;
    font-size: 1.1em;
    color: #999;
}

.group-card .card-image-wrapper {
    width: 120px; /* Size of the circular image area */
    height: 120px;
    border-radius: 50%; /* Makes it circular */
    overflow: hidden; /* Hides parts of image outside the circle */
    margin: 0 auto 20px; /* Center the image and add space below */
    display: flex; /* For centering the image vertically/horizontally */
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0; /* Placeholder background if image fails */
}

.group-card .card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the circular area without distortion */
    display: block; /* Removes extra space below image */
}

.group-card .group-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #444;
    margin-bottom: 25px; /* Space above the button */
    flex-grow: 1; /* Allows title to take up available space, pushing button down */
}

.group-card .join-group-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #007bff; /* Blue button color, matches image */
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px; /* Rounded button corners */
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s ease;
    border: none;
    width: 100%; /* Make button full width of card content area */
    box-sizing: border-box; /* Include padding in width calculation */
}

.group-card .join-group-button:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift on button hover */
}

/* Responsive Adjustments for smaller screens */
@media (max-width: 992px) {
    .groups-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    .whatsapp-groups-section .section-header h2 {
        font-size: 1.8em;
    }
}

@media (max-width: 768px) {
    .groups-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    .whatsapp-groups-section {
        padding: 30px 15px;
    }
    .whatsapp-groups-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px;
    }
    .whatsapp-groups-section .section-header h2 {
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .groups-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 15px;
    }
    .group-card {
        padding: 15px;
    }
    .group-card .card-image-wrapper {
        width: 100px;
        height: 100px;
        margin-bottom: 15px;
    }
    .group-card .group-title {
        font-size: 1.1em;
        margin-bottom: 20px;
    }
    .group-card .join-group-button {
        padding: 10px 20px;
    }
}
