/* HOA Events Management Admin Styles */

.hoa-events-search-container {
    margin: 20px 0;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.hoa-events-main-content-box {
    margin: 20px 0;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.hoa-events-form-container {
    background-color: #f9f9f9;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Search Form */
.hoa-events-search-form {
    background-color: #fff;
    border-radius: 4px;
}

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

.hoa-events-search-form .hoa-events-form-field {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hoa-events-search-form .hoa-events-form-field input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
    font-size: 14px;
}

.hoa-events-search-form .hoa-events-button-group {
    display: flex;
    gap: 10px;
}

.hoa-events-search-button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.hoa-events-search-button {
    padding: 8px 12px;
    line-height: 1;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: inherit;
    color: inherit;
    border: 1px solid inherit;
    border-radius: 4px;
    cursor: pointer;
}

/* Action buttons in table */
.hoa-events-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.hoa-events-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border-radius: 4px;
    padding: 8px 12px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    background: inherit;
    color: inherit;
    border: inherit;
}

.hoa-events-action-button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Custom table styling for better WordPress admin integration */
.wp-list-table .hoa-events-actions .button {
    margin: 2px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.5;
}

.wp-list-table .hoa-events-actions .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hoa-events-search-form .hoa-events-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hoa-events-search-form .hoa-events-button-group {
        justify-content: flex-start;
    }
    
    .hoa-events-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .wp-list-table .hoa-events-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Enhanced Notification Styles */
.hoa-events-notice {
    position: relative;
    padding: 12px 20px 12px 40px;
    margin: 15px 0;
    border-radius: 4px;
    border-left: 4px solid;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    line-height: 1.5;
    animation: slideIn 0.3s ease-out;
}

.hoa-events-notice:before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-family: dashicons;
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}

.hoa-events-notice-success {
    background-color: #f0f9f4;
    border-left-color: #46b450;
    color: #2e7d32;
}

.hoa-events-notice-success:before {
    content: '\f147';
    color: #46b450;
}

.hoa-events-notice-error {
    background-color: #fdf2f2;
    border-left-color: #dc3232;
    color: #721c24;
}

.hoa-events-notice-error:before {
    content: '\f158';
    color: #dc3232;
}

.hoa-events-notice-info {
    background-color: #f0f6fc;
    border-left-color: #72aee6;
    color: #0a4b78;
}

.hoa-events-notice-info:before {
    content: '\f348';
    color: #72aee6;
}

.hoa-events-notice-warning {
    background-color: #fff8e5;
    border-left-color: #ffb900;
    color: #856404;
}

.hoa-events-notice-warning:before {
    content: '\f534';
    color: #ffb900;
}

/* Animation for notifications */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auto-dismiss functionality */
.hoa-events-notice.auto-dismiss {
    animation: slideIn 0.3s ease-out, slideOut 0.3s ease-in 4.7s forwards;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Button Styles */
.hoa-events-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    color: #2c3338;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.hoa-events-button:hover {
    background-color: #f0f0f1;
    border-color: #8c8f94;
    color: #2c3338;
    text-decoration: none;
}

.hoa-events-button-primary {
    background-color: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.hoa-events-button-primary:hover {
    background-color: #135e96;
    border-color: #135e96;
    color: #fff;
}

.hoa-events-button-light {
    background-color: #fff;
    border-color: #c3c4c7;
    color: #2c3338;
}

.hoa-events-button-light:hover {
    background-color: #f6f7f7;
    border-color: #8c8f94;
}

.hoa-events-button-danger {
    background-color: #d63638;
    border-color: #d63638;
    color: #fff;
}

.hoa-events-button-danger:hover {
    background-color: #b32d2e;
    border-color: #b32d2e;
    color: #fff;
}

/* Add New Event Button */
.hoa-events-add-new-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.hoa-events-add-new-button:before {
    content: '\f132';
    font-family: dashicons;
    font-size: 18px;
    line-height: 1;
}

/* Form Styles */
.hoa-events-form-group {
    margin-bottom: 20px;
}

.hoa-events-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3338;
}

.hoa-events-form-group input[type="text"],
.hoa-events-form-group input[type="datetime-local"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
    transition: border-color 0.2s ease;
}

.hoa-events-form-group input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

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

.hoa-events-form-row .hoa-events-form-group {
    flex: 1;
    margin-bottom: 0;
}

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

/* Table Styles */
.hoa-events-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    overflow: hidden;
}

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

.hoa-events-table th {
    background-color: #f6f7f7;
    font-weight: 600;
    color: #2c3338;
    border-bottom: 2px solid #e2e4e7;
}

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

/* Pagination */
.hoa-events-pagination {
    margin-top: 20px;
    text-align: center;
}

.hoa-directory-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    text-decoration: none;
    color: #2271b1;
    background-color: #fff;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.hoa-directory-pagination .page-numbers.current,
.hoa-directory-pagination .page-numbers:hover {
    background-color: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

/* --- Homeowner Directory Specific Styles (from directory.md spec) --- */

.hoa-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #f7f9fb;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hoa-card-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hoa-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
    text-decoration: none; /* Make clickable card not show underline */
    color: inherit; /* Inherit color */
    flex-wrap: wrap; /* For responsiveness */
}

.hoa-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hoa-card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 1rem;
    background-color: #e0e0e0; /* Generic grey */
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hoa-card-avatar .dashicons {
    font-size: 36px; /* Larger Dashicon for avatar */
    color: #a0a0a0;
}

.hoa-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hoa-card-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.hoa-card-address {
    font-size: 0.95rem;
    color: #555;
}

/* Search and Sort Form Styles */
.hoa-directory-controls {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-end; /* Align inputs/selects at the bottom */
}

.hoa-directory-search-group {
    display: flex;
    gap: 0.5rem;
    flex-grow: 1;
    min-width: 250px; /* Ensure search input has some minimum width */
}

.hoa-directory-search-input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    font-size: 1rem;
}

.hoa-directory-search-field-select,
.hoa-directory-sort-select {
    padding: 0.75rem 1rem;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    cursor: pointer;
    -webkit-appearance: none; /* Remove default arrow on select */
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M5%208l5%205%205-5z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.hoa-directory-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem; /* Make it a square button for Dashicon */
    min-width: 44px; /* Ensure minimum touch target */
    min-height: 44px; /* Ensure minimum touch target */
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hoa-directory-button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
    color: #fff;
}

.hoa-directory-button-search {
    background-color: #4CAF50; /* Primary accent green */
}

.hoa-directory-button-search:hover {
    background-color: #45a049;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hoa-directory-button-clear {
    background-color: #f44336; /* Red for clear/undo */
    margin-left: 0.5rem; /* Spacing from search button */
}

.hoa-directory-button-clear:hover {
    background-color: #da190b;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hoa-directory-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap; /* For mobile responsiveness */
}

.hoa-directory-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    text-decoration: none;
    color: #2271b1;
    background-color: #fff;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.hoa-directory-pagination a.current,
.hoa-directory-pagination a:hover {
    background-color: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

/* The pagination styles have been updated above */

/* Detail View Styles */
.hoa-detail-view {
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hoa-detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.hoa-detail-header .hoa-card-avatar {
    width: 80px;
    height: 80px;
}

.hoa-detail-name {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.hoa-detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.hoa-detail-info-item {
    background-color: #f9f9f9;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.hoa-detail-info-item label {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.hoa-detail-info-item p {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
    font-weight: 600;
    word-wrap: break-word; /* Ensure long content wraps */
}

.hoa-detail-contact-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.hoa-detail-contact-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #2271b1;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hoa-detail-contact-links a:hover {
    background-color: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hoa-detail-contact-links .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.hoa-back-button {
    margin-top: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hoa-back-button:hover {
    background-color: #d0d0d0;
    transform: translateY(-2px);
}

.hoa-back-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Responsive adjustments for directory.md classes */
@media (max-width: 768px) {
    .hoa-container {
        padding: 1rem;
        margin: 1rem auto;
    }

    .hoa-directory-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hoa-directory-search-group {
        flex-direction: row; /* Keep search input and buttons inline */
        width: 100%;
        gap: 0.5rem;
    }

    .hoa-directory-search-input {
        flex-grow: 1;
    }

    .hoa-directory-search-field-select,
    .hoa-directory-sort-select {
        width: 100%;
    }

    .hoa-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .hoa-card-avatar {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }

    .hoa-card-name {
        font-size: 1.1rem;
    }
    .hoa-card-address {
        font-size: 0.85rem;
    }

    .hoa-detail-header {
        flex-direction: column;
        text-align: center;
    }

    .hoa-detail-info-grid {
        grid-template-columns: 1fr;
    }
}

.hoa-results-count {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    text-align: center;
}

/* Profile-like styles for directory detail view */
.hoa-profile-wrapper {

    margin: 20px auto;
    background-color: #f9f9f9;
    border: 1px solid #dddddd;
    border-radius: 4px;

    padding: 20px;
}

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

.hoa-profile-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hoa-profile-section h3 {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3338;
}

.hoa-profile-name {
    font-size: 2em;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.2;
    color: #2c3338;
}

.hoa-profile-role-info {
    font-size: 1em;
    margin-bottom: 5px;
    line-height: 1.5;
    color: #555;
}

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

.hoa-profile-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    color: #2c3338;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.hoa-profile-button:hover {
    background-color: #f0f0f1;
    border-color: #8c8f94;
    color: #2c3338;
    text-decoration: none;
}

.hoa-profile-button-primary {
    background-color: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.hoa-profile-button-primary:hover {
    background-color: #135e96;
    border-color: #135e96;
    color: #fff;
}

.hoa-profile-edit-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hoa-profile-edit-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

/* Responsive adjustments for profile-like styles */
@media (max-width: 768px) {
    .hoa-profile-wrapper {
        margin: 10px;
        padding: 15px;
    }
    
    .hoa-profile-name {
        font-size: 1.8em;
    }
    
    .hoa-profile-form-actions {
        flex-direction: column;
    }
}