/*
 * Sonny's Portal Styling
 * v4.0 - Mobile Responsive Update
 */

/* General container styles */
.sonny-portal-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    background-color: #fff;
}
.sonny-portal-wrapper h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #111;
}

/* Header */
.sonny-customer-data-container .sonny-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    padding: 20px;
    margin: 0;
    border-radius: 0;
}

/* Stats and Filters boxes */
.sonny-portal-stats, .sonny-portal-filters {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0;
    padding: 20px;
    margin: 0;
    text-align: left;
}
.sonny-portal-stats p, .sonny-portal-wrapper p {
    margin: 0;
    padding: 0;
    font-size: 1em;
    line-height: 1.5;
}

/* Filter Grid Layout */
.sonny-portal-filters .sonny-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}
.sonny-portal-filters .sonny-filter-row:last-of-type {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 0;
}

/* Form Inputs */
.sonny-portal-filters input, .sonny-portal-filters select {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    height: 48px;
    box-sizing: border-box;
}

/* Data Table */
.sonny-data-table-container {
    overflow-x: auto;
    background: #fff;
    padding: 20px;
}
.sonny-data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sonny-data-table th, .sonny-data-table td { padding: 12px 15px; border-bottom: 1px solid #e5e5e5; text-align: left; }
.sonny-data-table thead th { background-color: #f2f2f2; font-weight: 600; }
.sonny-data-table tbody tr:hover { background-color: #f1f3f5; }


/* Buttons */
.sonny-portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.sonny-portal-btn.sonny-portal-btn-primary { background-color: #04d9ff; color: white; }
.sonny-portal-btn.sonny-portal-btn-primary:hover { background-color: #00b8d4; }
.sonny-portal-btn.sonny-portal-btn-secondary { background-color: #6c757d; color: white; }
.sonny-portal-btn.sonny-portal-btn-secondary:hover { background-color: #5a6268; }
.sonny-portal-header .sonny-portal-btn { width: auto; }

/* Admin Login Form Inputs (unrelated to this page, but keeping for consistency) */
#sonny-portal-login-form input[type="text"],
#sonny-portal-login-form input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

/* --- NEW: MOBILE RESPONSIVE STYLES --- */
@media screen and (max-width: 768px) {
    /* Reduce padding on main containers */
    .sonny-customer-data-container .sonny-portal-header,
    .sonny-portal-stats,
    .sonny-portal-filters,
    .sonny-data-table-container {
        padding: 15px;
    }

    /* Stack header items */
    .sonny-customer-data-container .sonny-portal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .sonny-portal-header .sonny-portal-btn {
        width: 100%; /* Make logout button full-width on mobile */
    }

    /* Stack filter inputs and buttons into a single column */
    .sonny-portal-filters .sonny-filter-row {
        grid-template-columns: 1fr;
    }
}

/* Style for the color-coded membership plan badges */
.sonny-plan-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px; /* Pill shape */
    font-size: 0.85em;
    font-weight: 500;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
    white-space: nowrap;
}

/* Color classes based on plan names */
.plan-color-premium {
    background-color: #007bff; /* Blue */
}

.plan-color-ultimate {
    background-color: #6f42c1; /* Purple */
}

.plan-color-basic {
    background-color: #6c757d; /* Gray */
}

/* Default color for any other plan */
.plan-color-default {
    background-color: #28a745; /* Green */
}
