/* Gym Member Management Stylesheet */
.gmm-admin-wrap {
    margin: 20px 20px 0 0;
}

.gmm-header-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.gmm-page-title {
    font-weight: 700 !important;
    color: #1e293b;
    margin: 0 !important;
}

.gmm-clear-btn {
    color: #dc2626 !important;
    border-color: #fca5a5 !important;
    background: #fff5f5 !important;
    font-weight: 600 !important;
    padding: 5px 15px !important;
    height: auto !important;
    border-radius: 6px !important;
}

/* Stats Container Grid */
.gmm-dashboard-container {
    display: flex;
    gap: 15px;
    margin: 20px 0 30px 0;
    flex-wrap: wrap;
}

.gmm-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    flex: 1;
    min-width: 200px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border-left: 5px solid #cbd5e1;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gmm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px -1px rgba(0, 0, 0, 0.08);
}

.gmm-stat-card.active-card { border-left-color: #10b981; }
.gmm-stat-card.new-card { border-left-color: #3b82f6; }
.gmm-stat-card.pending-card { border-left-color: #f59e0b; }
.gmm-stat-card.alert-card { border-left-color: #ef4444; }

.gmm-stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.gmm-stat-card .gmm-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

/* Search Box Form Layout */
.gmm-search-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.gmm-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    flex-wrap: wrap;
    width: 100%;
}

.gmm-search-select, 
.gmm-search-input {
    height: 42px !important;
    line-height: 24px !important;
    padding: 8px 14px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    color: #334155 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

.gmm-search-select {
    width: 240px !important;
    max-width: 100%;
    background-color: #fff !important;
}

.gmm-search-input {
    flex: 1;
    min-width: 200px !important;
}

.gmm-search-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.gmm-search-submit {
    height: 42px !important;
    line-height: 40px !important;
    padding: 0 24px !important;
    font-size: 14px !important;
    border-radius: 6px !important;
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    cursor: pointer;
}

.gmm-reset-btn {
    height: 42px !important;
    line-height: 40px !important;
    border-radius: 6px !important;
    padding: 0 16px !important;
}

/* Table Wrapper for Horizontal Mobile Scrolling */
.gmm-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 20px;
}

.gmm-members-table {
    border: none !important;
    border-collapse: collapse;
    width: 100%;
    min-width: 950px; /* Force minimum desktop-friendly width inside scroll view */
}

.gmm-members-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 15px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.gmm-members-table td {
    padding: 15px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

/* Badge Layouts */
.gmm-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: capitalize;
    text-align: center;
    line-height: 1.4;
}

.gmm-badge.new { background-color: #dbeafe; color: #1e40af; }
.gmm-badge.active { background-color: #d1fae5; color: #065f46; }
.gmm-badge.free-pass { background-color: #f3e8ff; color: #6b21a8; }
.gmm-badge.frozen { background-color: #e0f2fe; color: #0369a1; }
.gmm-badge.suspended { background-color: #fef3c7; color: #92400e; }
.gmm-badge.expired { background-color: #ffe4e6; color: #9f1239; }
.gmm-badge.cancelled { background-color: #fee2e2; color: #991b1b; }

.gmm-monospaced-badge {
    font-family: monospace;
    font-weight: 600;
}

/* ==========================================================================
   MODAL DIALOG STRUCTURE (PRECISE HEIGHT CONTROLS)
   ========================================================================== */
.gmm-modal-overlay {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 20px;
    box-sizing: border-box;
}

.gmm-modal-overlay.is-active {
    display: flex !important;
    opacity: 1 !important;
}

.gmm-modal-box {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 85vh; /* Screen height se modal ko chota rakhega */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column; /* Fixed Header & Footer structure */
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.25s ease;
    box-sizing: border-box;
    text-align: left !important;
}

.gmm-modal-overlay.is-active .gmm-modal-box {
    transform: translateY(0);
}

.gmm-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    flex-shrink: 0;
    text-align: left !important;
}

.gmm-modal-header h3 {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    text-align: left !important;
}

.gmm-modal-close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.15s ease;
}

.gmm-modal-close-btn:hover {
    color: #475569;
}

/* Scroll area of the modal body */
.gmm-modal-body {
    padding: 24px;
    overflow-y: auto !important; /* Forces scrollbar inside body */
    flex-grow: 1;
    background: #ffffff;
    box-sizing: border-box;
    scrollbar-width: thin;
    text-align: left !important;
}

/* Custom scrollbars for Webkit engines */
.gmm-modal-body::-webkit-scrollbar {
    width: 6px;
}
.gmm-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.gmm-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.gmm-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Grid specifications */
.gmm-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.gmm-grid-full {
    grid-column: span 2;
}

.gmm-info-block {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
    text-align: left !important;
}

.gmm-info-block-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    text-align: left !important;
}

.gmm-info-block-value {
    font-size: 14px;
    color: #0f172a;
    font-weight: 500;
    text-align: left !important;
}

/* Checklist Styling */
.gmm-checklist-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px !important;
    margin-top: 8px;
    text-align: left !important;
}

.gmm-checklist-header-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 12px !important;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 6px;
    text-align: left !important;
}

.gmm-checklist-header-title .dashicons {
    color: #2563eb;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.gmm-checklist-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-align: left !important;
}

.gmm-checklist-item {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: left !important;
}

.gmm-checklist-item.item-completed {
    color: #059669;
}

.gmm-checklist-item.item-completed b {
    color: #059669;
}

.gmm-checklist-item.item-pending {
    color: #64748b;
}

.gmm-checklist-overall {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    text-align: left !important;
}

.gmm-checklist-overall.completed-status {
    color: #059669;
}

.gmm-checklist-overall.pending-status {
    color: #dc2626;
}

/* Verification Notes View */
.gmm-notes-view {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    color: #334155;
    min-height: 60px;
    white-space: pre-wrap;
    text-align: left !important;
}

/* Input Fields & Fields configurations */
.gmm-field-group {
    margin-bottom: 4px;
    text-align: left !important;
}

.gmm-field-group label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    font-size: 13px;
    text-align: left !important; /* Forces left alignment of form field labels */
}

.gmm-field-group input[type="text"],
.gmm-field-group select {
    width: 100% !important;
    height: 40px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    color: #0f172a !important;
    background: #ffffff !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    text-align: left !important;
}

.gmm-field-group textarea {
    width: 100% !important;
    height: 90px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    color: #0f172a !important;
    resize: vertical !important;
    box-sizing: border-box !important;
    text-align: left !important;
}

.gmm-flex-end-checkbox {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    padding: 10px 0;
    width: 100%;
    text-align: left !important;
}
.gmm-checkbox-label {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 8px;
    cursor: pointer;
    font-weight: 600 !important;
    margin: 0 !important;
    text-align: left !important;
}

.gmm-checkbox-label-compact {
    font-weight: 500 !important;
    font-size: 13px !important;
}

/* Modal Action Footer buttons */
.gmm-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: #f8fafc;
    flex-shrink: 0;
}

.gmm-btn-secondary {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    height: 38px !important;
    line-height: 36px !important;
    border-radius: 6px !important;
    padding: 0 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gmm-btn-secondary:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.gmm-btn-primary {
    background: #2563eb !important;
    border: 1px solid #2563eb !important;
    color: #ffffff !important;
    height: 38px !important;
    line-height: 36px !important;
    border-radius: 6px !important;
    padding: 0 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gmm-btn-primary:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

.gmm-actions-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gmm-action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.gmm-action-icon-btn.btn-preview {
    color: #475569;
}

.gmm-action-icon-btn.btn-preview:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.gmm-action-icon-btn.btn-edit {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.gmm-action-icon-btn.btn-edit:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}


/* ==========================================================================
   MOBILE & TABLET VIEWPORT RESPONSIVENESS RULES
   ========================================================================== */

@media (max-width: 782px) {
    .gmm-header-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gmm-clear-form {
        width: 100%;
    }
    
    .gmm-clear-btn {
        width: 100%;
        text-align: center;
    }

    /* Stats Card stack grid */
    .gmm-dashboard-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .gmm-stat-card {
        min-width: 0;
    }
}

@media (max-width: 650px) {
    .gmm-modal-overlay {
        padding: 10px;
    }

    .gmm-modal-box {
        max-height: 92vh; /* Full mobile viewport optimization */
    }

    .gmm-modal-grid {
        grid-template-columns: 1fr; /* Single column flow on mobile */
        gap: 12px;
    }

    .gmm-grid-full {
        grid-column: span 1;
    }

    .gmm-checklist-grid {
        grid-template-columns: 1fr; /* Stacked checklists */
    }

    .gmm-flex-end-checkbox {
        align-items: flex-start;
        padding-top: 4px;
        justify-content: flex-start !important;
    }
    
    .gmm-modal-body {
        padding: 16px;
    }
    
    .gmm-modal-header {
        padding: 12px 16px;
    }
    
    .gmm-modal-footer {
        padding: 12px 16px;
    }
}

@media (max-width: 580px) {
    /* Form fields stretch responsive styling */
    .gmm-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .gmm-search-select, 
    .gmm-search-input {
        width: 100% !important;
    }

    .gmm-search-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 10px;
    }

    .gmm-search-submit,
    .gmm-reset-btn {
        width: 100% !important;
        text-align: center;
        box-sizing: border-box !important;
    }

    .gmm-dashboard-container {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   PAGINATION SLEEK STYLE RULES
   ========================================================================== */
.gmm-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0 15px 0;
    width: 100%;
}

.gmm-pagination {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Base styles for page numbers and active pagination link */
.gmm-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.gmm-pagination a.page-numbers:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

.gmm-pagination .page-numbers.current {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.gmm-pagination .page-numbers.dots {
    color: #94a3b8;
    cursor: default;
}

/* Previous & Next Arrow styles */
.gmm-pagination .page-numbers.prev,
.gmm-pagination .page-numbers.next {
    padding: 0 12px;
    border-color: #e2e8f0;
    background: #f8fafc;
}

.gmm-pagination .page-numbers.prev:hover,
.gmm-pagination .page-numbers.next:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}



/* Keeps any form inside the modal strictly bounded and scrollable */
.gmm-modal-box form {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 85vh; /* Keeps form container locked within popup boundary */
    overflow: hidden;
    margin: 0;
}

/* Document Preview Modal Active state configuration */
.gmm-preview-modal-overlay.is-active {
    display: flex !important;
    opacity: 1 !important;
}

/* Animated loader dots */
.gmm-dots-loader {
    display: inline-block;
    animation: gmmLoadingDots 1.4s infinite both;
}

@keyframes gmmLoadingDots {
    0% { opacity: .2; }
    20% { opacity: 1; }
    100% { opacity: .2; }
}

@keyframes gmmHighlightFade {
    0% { background-color: #fef08a !important; } /* Soft Yellow flash on landing */
    100% { background-color: transparent; }
}