/**
 * Members Frontend Styles
 */

.members-directory-container,
.members-profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.members-directory-header,
.members-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.members-directory-header h1,
.members-profile-header h1 {
    margin: 0;
    font-size: 2em;
    color: #333;
}

.members-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.members-edit-profile-link,
.members-directory-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.members-edit-profile-link:hover,
.members-directory-link:hover {
    background-color: #005a87;
    color: #fff;
}

.members-logout-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #d63638;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.members-logout-link:hover {
    background-color: #b32d2e;
    color: #fff;
}

.members-list-wrapper {
    margin-top: 20px;
    overflow-x: auto;
}

.members-list-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.members-list-table thead {
    background-color: #f8f9fa;
}

.members-list-table th {
    padding: 16px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.members-list-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    color: #212529;
    font-size: 0.95em;
}

.members-list-table tbody tr {
    transition: background-color 0.2s ease;
}

/* Striped rows */
.members-list-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.members-list-table tbody tr:hover {
    background-color: #e9ecef;
}

.members-list-table tbody tr:last-child td {
    border-bottom: none;
}

.members-list-table .column-first-name,
.members-list-table .column-last-name {
    font-weight: 600;
    color: #333;
}

.members-list-table .column-email a,
.members-list-table .column-phone a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.members-list-table .column-email a:hover,
.members-list-table .column-phone a:hover {
    color: #005a87;
    text-decoration: underline;
}

.members-list-table .na {
    color: #6c757d;
    font-style: italic;
}

/* DataTables styling */
.members-list-wrapper .dataTables_wrapper {
    margin-top: 20px;
}

.members-list-wrapper .dataTables_filter {
    margin-bottom: 15px;
}

.members-list-wrapper .dataTables_filter input {
    margin-left: 10px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.95em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.members-list-wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.members-list-wrapper .dataTables_length {
    margin-bottom: 15px;
}

.members-list-wrapper .dataTables_length select {
    margin: 0 10px;
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.95em;
    background-color: #fff;
    transition: border-color 0.2s ease;
}

.members-list-wrapper .dataTables_length select:focus {
    outline: none;
    border-color: #0073aa;
}

.members-list-wrapper .dataTables_info {
    padding-top: 15px;
    color: #666;
}

.members-list-wrapper .dataTables_paginate {
    padding-top: 15px;
}

.members-list-wrapper .dataTables_paginate .paginate_button {
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background-color: #fff;
    color: #0073aa;
}

.members-list-wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.members-list-wrapper .dataTables_paginate .paginate_button.current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.members-list-wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.members-list-wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background-color: #fff;
    color: #0073aa;
    border-color: #ddd;
}

.members-profile-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.members-profile-column {
    display: flex;
    flex-direction: column;
}

.members-profile-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.members-form-section {
    margin-bottom: 30px;
}

.members-form-section h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.members-form-field {
    margin-bottom: 20px;
}

.members-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.members-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.members-show-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    font-size: 0.9em;
    color: #666;
    cursor: pointer;
    margin-top: 5px;
}

.members-show-checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.members-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    margin-bottom: 0;
}

.members-checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: auto;
    flex-shrink: 0;
}

.members-address-group {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.members-address-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.members-address-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.members-address-field label {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.members-address-field .members-input {
    width: 100%;
}

.members-address-group .members-show-checkbox {
    margin-top: 15px;
}

.members-password-form {
    /* No longer needs top margin/border since it's in a separate column */
}

.members-password-form .members-form-section h2 {
    color: #333;
}

.members-form-field .description {
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.members-form-field .required {
    color: #d63638;
}

.members-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.members-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.members-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.members-submit-button {
    padding: 12px 30px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.members-submit-button:hover {
    background-color: #005a87;
}

.members-submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.members-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.members-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.members-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Collection Field Styles */
.members-collection-field {
    width: 100%;
}

.members-collection-items {
    margin-bottom: 10px;
}

.members-collection-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.members-collection-item .members-collection-input {
    flex: 1;
}

.members-collection-item .button {
    min-width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.members-collection-item .button .dashicons {
    margin: 0;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.members-add-collection-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.members-add-collection-item .dashicons {
    margin: 0;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .members-directory-header,
    .members-profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .members-header-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .members-edit-profile-link,
    .members-directory-link,
    .members-logout-link {
        width: 100%;
        text-align: center;
    }
    
    .members-list-wrapper {
        overflow-x: scroll;
    }
    
    .members-list-table {
        font-size: 0.9em;
    }
    
    .members-list-table th,
    .members-list-table td {
        padding: 10px;
    }
    
    .members-profile-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .members-profile-form {
        padding: 20px;
    }
}

/* Dark Theme Styles */
.members-theme-dark .members-directory-container {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.members-theme-dark .members-directory-header {
    border-bottom-color: #333;
}

.members-theme-dark .members-directory-header h1 {
    color: #e0e0e0;
}

.members-theme-dark .members-list-table {
    background: #2d2d2d;
    border-color: #404040;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.members-theme-dark .members-list-table thead {
    background-color: #252525;
}

.members-theme-dark .members-list-table th {
    color: #e0e0e0;
    border-bottom-color: #404040;
}

.members-theme-dark .members-list-table td {
    border-bottom-color: #404040;
    color: #e0e0e0;
}

/* Striped rows for dark theme */
.members-theme-dark .members-list-table tbody tr:nth-child(even) {
    background-color: #252525;
}

.members-theme-dark .members-list-table tbody tr:hover {
    background-color: #353535;
}

.members-theme-dark .members-list-table .column-first-name,
.members-theme-dark .members-list-table .column-last-name {
    color: #e0e0e0;
}

.members-theme-dark .members-list-table .column-email a,
.members-theme-dark .members-list-table .column-phone a {
    color: #4a9eff;
}

.members-theme-dark .members-list-table .column-email a:hover,
.members-theme-dark .members-list-table .column-phone a:hover {
    color: #6bb3ff;
}

.members-theme-dark .members-list-table .na {
    color: #888;
}

/* DataTables dark theme styling */
.members-theme-dark .members-list-wrapper .dataTables_filter input {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

.members-theme-dark .members-list-wrapper .dataTables_filter input:focus {
    border-color: #4a9eff;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.members-theme-dark .members-list-wrapper .dataTables_length select {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

.members-theme-dark .members-list-wrapper .dataTables_length select:focus {
    border-color: #4a9eff;
}

.members-theme-dark .members-list-wrapper .dataTables_info {
    color: #b0b0b0;
}

.members-theme-dark .members-list-wrapper .dataTables_paginate .paginate_button {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

.members-theme-dark .members-list-wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #4a9eff;
    color: #fff;
    border-color: #4a9eff;
}

.members-theme-dark .members-list-wrapper .dataTables_paginate .paginate_button.current {
    background-color: #4a9eff;
    color: #fff;
    border-color: #4a9eff;
}

.members-theme-dark .members-list-wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    color: #666;
}

.members-theme-dark .members-list-wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background-color: #2d2d2d;
    color: #666;
    border-color: #404040;
}

/* Font Size Styles */
.members-font-size-smaller .members-list-table {
    font-size: 0.85em;
}

.members-font-size-smaller .members-list-table th {
    font-size: 0.85em;
    padding: 12px 12px;
}

.members-font-size-smaller .members-list-table td {
    font-size: 0.85em;
    padding: 12px 12px;
}

.members-font-size-normal .members-list-table {
    font-size: 0.95em;
}

.members-font-size-larger .members-list-table {
    font-size: 1.1em;
}

.members-font-size-larger .members-list-table th {
    font-size: 1.05em;
    padding: 18px 18px;
}

.members-font-size-larger .members-list-table td {
    font-size: 1.05em;
    padding: 18px 18px;
}
