/* HOA Board Management Styles */
.hoa-board-management {
    max-width: 100%;
    margin: 20px 0;
    font-family: Arial, sans-serif;
}

.hoa-board-management h2 {
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.hoa-board-actions {
    margin-bottom: 20px;
}

.hoa-board-search {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.hoa-board-search form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hoa-board-search input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 250px;
}

.hoa-board-search button {
    padding: 8px 15px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.hoa-board-search button:hover {
    background-color: #005a87;
}

/* Specific styling for the homeowners list container in Add New Board Member tab */
.hoa-homeowners-list {
    margin-top: 20px;
    overflow-x: auto;
}

.hoa-homeowners-list table {
    min-width: 100%;
}

.hoa-homeowners-list p.hoa-notice-info {
    padding: 15px;
    text-align: center;
    color: #666;
}

.hoa-board-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hoa-board-table th,
.hoa-board-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.hoa-board-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
}

.hoa-board-table tr:hover {
    background-color: #f9f9f9;
}

.hoa-board-table .button {
    margin-right: 5px;
    margin-bottom: 5px;
}

.hoa-back-link {
    margin-bottom: 20px;
}

.hoa-back-link a {
    color: #0073aa;
    text-decoration: none;
}

.hoa-back-link a:hover {
    text-decoration: underline;
}

.hoa-board-member-form {
    max-width: 600px;
    margin: 20px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.button-primary {
    background-color: #0073aa !important;
    color: white !important;
    border: none !important;
}

.button-primary:hover {
    background-color: #005a87 !important;
}

.button-secondary {
    background-color: #6c757d !important;
    color: white !important;
    border: none !important;
}

.button-secondary:hover {
    background-color: #545b62 !important;
}

.button-delete {
    background-color: #dc3545 !important;
    color: white !important;
    border: none !important;
}

.button-delete:hover {
    background-color: #c82333 !important;
}

/* HOA Directory Styles - Added for consistency */
.hoa-container {
    max-width: 100%;
    margin: 20px 0;
    font-family: Arial, sans-serif;
}

.hoa-notice-error {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 15px;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    margin: 0 0 20px 0;
}

.hoa-notice-info {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 12px 15px;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    margin: 20px 0;
}

.hoa-events-form-container {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.hoa-events-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.hoa-events-form-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 0;
}

.hoa-events-form-field {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.hoa-events-form-control {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    min-width: 150px;
}

.hoa-directory-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 250px;
}

.hoa-events-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.hoa-events-button:hover {
    text-decoration: none;
}

.hoa-events-search-button {
    display: flex;
    align-items: center;
    gap: 5px;
}

.hoa-events-button-primary {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.hoa-events-button-primary:hover {
    background-color: #005a87;
    border-color: #005a87;
}

.hoa-events-button-light {
    background-color: #f8f9fa;
    color: #212529;
    border-color: #dee2e6;
}

.hoa-events-button-light:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.hoa-events-button-danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.hoa-events-button-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.hoa-results-count {
    margin: 15px 0;
    color: #666;
    font-style: italic;
}

.hoa-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.hoa-card {
    display: block;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hoa-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0.15);
    transform: translateY(-2px);
    border-color: #0073aa;
}

.hoa-card-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.hoa-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hoa-card-avatar .dashicons {
    font-size: 30px;
    color: #666;
}

.hoa-card-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hoa-card-name {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin: 0;
}

.hoa-card-role {
    color: #0073aa;
    font-weight: 500;
    font-size: 14px;
    margin: 0;
}

.hoa-card-address {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.hoa-directory-pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 0 10px;
}

.hoa-directory-pagination a,
.hoa-directory-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #0073aa;
    border-radius: 4px;
}

.hoa-directory-pagination a:hover {
    background-color: #f0f0f0;
}

.hoa-directory-pagination .current {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.hoa-profile-wrapper {
    max-width: 100%;
    margin: 20px auto;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.hoa-profile-section {
    margin-bottom: 20px;
}

.hoa-profile-name {
    font-size: 24px;
    color: #333;
    margin: 0 0 10px 0;
}

.hoa-profile-role {
    font-size: 18px;
    color: #0073aa;
    margin: 0 0 10px 0;
    font-weight: 500;
}

.hoa-profile-role-info {
    color: #666;
    font-size: 14px;
    margin: 10px 0 0 0;
}

.hoa-profile-form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 20px;
}

.hoa-profile-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.hoa-profile-button-primary {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.hoa-profile-button-primary:hover {
    background-color: #005a87;
    border-color: #005a87;
    text-decoration: none;
}

.hoa-events-main-content-box {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hoa-events-actions {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hoa-events-add-new-button {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.hoa-events-add-new-button:hover {
    background-color: #218838;
    border-color: #1e7e34;
    text-decoration: none;
}

.hoa-events-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.hoa-events-table th,
.hoa-events-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.hoa-events-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.hoa-events-table tr:hover {
    background-color: #f8f9fa;
}

/* Responsive wrapper for tables */
.hoa-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}

.hoa-table-responsive .hoa-events-table {
    margin: 0;
    min-width: 100%;
}

/* Responsive table styles for mobile */
@media (max-width: 768px) {
    .hoa-events-table {
        font-size: 14px;
    }
    
    .hoa-events-table th,
    .hoa-events-table td {
        padding: 8px 6px;
        min-width: 100px; /* Ensure minimum width for readability */
    }
    
    /* For very small screens, make the table horizontally scrollable */
    .hoa-events-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    /* Adjust the search form container for mobile */
    .hoa-homeowners-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -20px;
        padding: 0 20px;
        width: calc(100% + 40px);
    }
    
    /* Additional responsive styles for the table container */
    .hoa-homeowners-list {
        margin: 20px -20px;
        padding: 0 20px;
        width: calc(100% + 40px);
    }
}

.hoa-events-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.hoa-events-form-group {
    margin-bottom: 15px;
    flex: 1 1 200px;
}

.hoa-events-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.hoa-events-form-group input,
.hoa-events-form-group select,
.hoa-events-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.hoa-events-form-group input:focus,
.hoa-events-form-group select:focus,
.hoa-events-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.hoa-events-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.required {
    color: #dc3545;
}

/* Responsive design */
@media (max-width: 768px) {
    .hoa-board-table {
        font-size: 14px;
    }
    
    .hoa-board-table th,
    .hoa-board-table td {
        padding: 8px;
    }
    
    .hoa-board-search form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hoa-board-search input[type="text"] {
        min-width: auto;
    }
    
    .hoa-card-list {
        grid-template-columns: 1fr;
    }
    
    .hoa-events-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hoa-events-form-row {
        flex-direction: column;
    }
    
    .hoa-events-actions {
        flex-direction: column;
    }
    
    .hoa-events-form-actions {
        flex-direction: column;
    }
    
    .hoa-profile-form-actions {
        flex-direction: column;
    }
    
    /* Additional responsive styles for the add board member form */
    .hoa-homeowners-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -20px;
        padding: 0 20px;
        width: calc(100% + 40px);
    }
    
    /* Ensure proper spacing for the search results container */
    .hoa-homeowners-list table {
        min-width: 100%;
    }
}