/**
 * MemberPress Company Directory Styles
 */

/* Container */
.mepr-directory-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.mepr-directory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
}

.mepr-directory-header h2 {
    margin: 0;
    font-size: 28px;
}

.mepr-directory-logout,
.mepr-back-link {
    text-decoration: none;
    color: #0073aa;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mepr-directory-logout:hover,
.mepr-back-link:hover {
    color: #005177;
}

/* Password Form */
.mepr-directory-password-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

.mepr-directory-password-form h3 {
    margin-top: 0;
    text-align: center;
}

.mepr-directory-error {
    color: #d63638;
    background: #fef0f0;
    border: 1px solid #d63638;
    padding: 10px;
    border-radius: 3px;
    text-align: center;
}

.mepr-directory-password-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
}

.mepr-directory-submit {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.mepr-directory-submit:hover {
    background: #005177;
}

/* A-Z Navigation */
.mepr-az-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
    justify-content: center;
}

.mepr-az-navigation a,
.mepr-az-navigation span {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mepr-az-navigation a {
    background: #0073aa;
    color: #fff;
}

.mepr-az-navigation a:hover {
    background: #005177;
    transform: scale(1.1);
}

.mepr-az-navigation span.inactive {
    background: #ddd;
    color: #999;
    cursor: not-allowed;
}

/* Company List */
.mepr-company-list {
    margin-top: 20px;
}

.mepr-letter-header {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    scroll-margin-top: 20px;
}

.mepr-company-items {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.mepr-company-items li {
    margin: 0;
}

.mepr-company-items a {
    display: block;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mepr-company-items a:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Members List */
.mepr-members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mepr-member-card {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.mepr-member-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mepr-member-name {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.mepr-member-title {
    margin: 0 0 15px 0;
    font-style: italic;
    color: #666;
}

.mepr-member-details {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.mepr-member-details p {
    margin: 10px 0;
}

.mepr-member-address {
    margin-bottom: 15px;
}

.mepr-member-phone,
.mepr-member-email,
.mepr-member-type {
    margin: 5px 0;
}

.mepr-member-email a {
    color: #0073aa;
    text-decoration: none;
}

.mepr-member-email a:hover {
    text-decoration: underline;
}

/* Member Roster Table */
.mepr-roster-list {
    margin-top: 20px;
}

.mepr-roster-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mepr-roster-table thead {
    background: #0073aa;
    color: #fff;
}

.mepr-roster-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #005177;
}

.mepr-roster-table tbody tr {
    border-bottom: 1px solid #ddd;
    transition: background 0.2s ease;
}

.mepr-roster-table tbody tr:hover {
    background: #f5f5f5;
}

.mepr-roster-table td {
    padding: 12px 15px;
}

.mepr-roster-name {
    font-weight: 500;
    color: #333;
}

.mepr-roster-company a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mepr-roster-company a:hover {
    color: #005177;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mepr-directory-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .mepr-company-items {
        grid-template-columns: 1fr;
    }

    .mepr-members-list {
        grid-template-columns: 1fr;
    }

    .mepr-az-navigation {
        gap: 5px;
    }

    .mepr-az-navigation a,
    .mepr-az-navigation span {
        width: 25px;
        height: 25px;
        line-height: 25px;
        font-size: 14px;
    }

    /* Responsive roster table */
    .mepr-roster-table {
        font-size: 14px;
    }

    .mepr-roster-table th,
    .mepr-roster-table td {
        padding: 10px 8px;
    }
}
