/**
 * Member Management System - Frontend Styles
 *
 * @package Member_Management_System
 * @version 1.1.0
 */

/* ==================== BASE STYLES ==================== */

.mms-frontend {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

.mms-frontend * {
    box-sizing: border-box;
}

/* ==================== HEADER & STATS ==================== */

.mms-frontend-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.mms-frontend-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.mms-frontend-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 15px;
}

.mms-frontend-header .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 8px;
}

.mms-stats-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 25px;
}

.mms-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.mms-stat strong {
    color: #2271b1;
    font-size: 18px;
}

.mms-stat-highlight {
    color: #2271b1 !important;
    font-weight: 600;
}

/* ==================== ACCESS DENIED ==================== */

.mms-access-denied {
    text-align: center;
    padding: 60px 30px;
    background: #fff3f3;
    border: 2px solid #ffcccc;
    border-radius: 12px;
    max-width: 500px;
    margin: 40px auto;
}

.mms-access-denied p {
    font-size: 18px;
    color: #c00;
    margin-bottom: 20px;
}

/* ==================== MEMBER CARDS ==================== */

.mms-members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mms-member-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mms-member-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #667eea;
}

.mms-member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    flex-shrink: 0;
}

.mms-member-info {
    flex: 1;
    min-width: 0;
}

.mms-member-name {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mms-member-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.mms-member-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mms-member-meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.mms-member-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #9ca3af;
}

.mms-view-detail-btn {
    text-decoration: none;
    font-size: 13px;
    flex-shrink: 0;
}

/* ==================== STATUS BADGES ==================== */

.mms-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mms-status-active {
    background: #d1fae5;
    color: #065f46;
}

.mms-status-inactive {
    background: #fef3c7;
    color: #92400e;
}

.mms-status-deceased {
    background: #fee2e2;
    color: #991b1b;
}

/* ==================== SEARCH FORM ==================== */

.mms-search-form-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}

.mms-search-box {
    margin-top: 15px;
}

.mms-search-box input[type="text"] {
    min-width: 250px;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.mms-search-box button {
    padding: 10px 20px;
}

.mms-advanced-search-form .mms-form-group {
    margin-bottom: 18px;
}

.mms-advanced-search-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
    font-size: 14px;
}

.mms-advanced-search-form input,
.mms-advanced-search-form select {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.mms-form-actions {
    margin-top: 25px;
    display: flex;
    gap: 12px;
}

.mms-form-actions .button-large {
    padding: 12px 28px;
    font-size: 15px;
}

/* ==================== BIRTHDAY REPORT ==================== */

.mms-birthday-list {
    margin-top: 25px;
}

.mms-birthday-group {
    margin-bottom: 30px;
}

.mms-date-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
    margin-bottom: 15px;
}

.mms-date-header .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.mms-count-badge {
    background: #667eea;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: normal;
}

.mms-birthday-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.mms-birthday-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    gap: 15px;
    position: relative;
}

.mms-birthday-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    position: relative;
    flex-shrink: 0;
}

.mms-cake-icon {
    position: absolute;
    bottom: -5px;
    right: -5px;
    font-size: 18px;
}

.mms-birthday-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #1f2937;
}

.mms-member-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.mms-age {
    color: #dc2626;
    font-weight: 600;
}

.mms-contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mms-contact-link {
    font-size: 12px;
    color: #6b7280;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mms-contact-link:hover {
    color: #667eea;
}

/* ==================== NO RESULTS ==================== */

.mms-no-results {
    text-align: center;
    padding: 50px 20px;
    color: #6b7280;
}

.mms-no-results-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.mms-no-results h3 {
    margin: 0 0 10px 0;
    color: #374151;
}

/* ==================== PAGINATION ==================== */

.mms-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 25px 0;
}

.mms-page-info {
    color: #6b7280;
    font-size: 14px;
}

/* ==================== MODAL ==================== */

.mms-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mms-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.mms-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    width: 95%;
    padding: 30px;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.mms-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    padding: 5px 10px;
}

.mms-modal-close:hover {
    color: #374151;
}

/* ==================== FORM STYLES ==================== */

.mms-frontend-form fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.mms-fieldset legend {
    font-weight: 600;
    color: #374151;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mms-fieldset legend .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.mms-frontend-form .form-table th {
    width: 180px;
    vertical-align: top;
    padding: 12px 10px;
}

.mms-frontend-form .form-table td {
    padding: 12px 10px;
}

.mms-frontend-form input[type="text"],
.mms-frontend-form input[type="email"],
.mms-frontend-form input[type="tel"],
.mms-frontend-form input[type="date"],
.mms-frontend-form input[type="number"],
.mms-frontend-form select,
.mms-frontend-form textarea {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.mms-frontend-form textarea.large-text {
    max-width: 500px;
}

.required {
    color: #dc2626;
}

/* ==================== EXPORT BUTTON ==================== */

.mms-export-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* ==================== TABLES ==================== */

.mms-frontend-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mms-frontend-table th {
    background: #f9fafb;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.mms-frontend-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f3f4f6;
}

.mms-frontend-table tr:hover {
    background: #f9fafb;
}

/* ==================== LOADING SPINNER ==================== */

.mms-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.mms-loading .spinner {
    float: none;
    margin: 0 auto 10px;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .mms-frontend {
        margin: 10px;
        padding: 0 10px;
    }
    
    .mms-frontend-header {
        padding: 20px;
    }
    
    .mms-frontend-header h2 {
        font-size: 22px;
    }
    
    .mms-members-list {
        grid-template-columns: 1fr;
    }
    
    .mms-birthday-cards {
        grid-template-columns: 1fr;
    }
    
    .mms-member-card {
        padding: 15px;
    }
    
    .mms-stats-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .mms-advanced-search-form input,
    .mms-advanced-search-form select {
        max-width: 100%;
    }
    
    .mms-modal-content {
        width: 98%;
        padding: 20px;
        margin: 10px;
    }
}
