/* START KOL Member Role Display Frontend */

.kol-mrd-role-card {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    align-items: center;
}

.kol-mrd-role-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 32px;
    padding: 0 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

html.dark-mode .kol-mrd-role-item {
    background: linear-gradient(135deg, #383838 0%, #343434 100%);
    border: 1px solid #282828;
    border-top-color: #555555;
    border-left-color: #555555;
    border-right-color: #282828;
    border-bottom-color: #282828;
    color: white;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
}

html.dark-mode .kol-mrd-role-item:hover {
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

html.light-mode .kol-mrd-role-item {
    background: linear-gradient(135deg, #e2e2e2 0%, #d4d4d4 100%);
    border: 1px solid #b0b0b0;
    border-top-color: #f0f0f0;
    border-left-color: #f0f0f0;
    border-right-color: #b0b0b0;
    border-bottom-color: #b0b0b0;
    color: #2d2d2d;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

html.light-mode .kol-mrd-role-item:hover {
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.kol-mrd-role-icon {
    display: inline-block;
    font-size: 15px;
    line-height: 1;
}

.kol-mrd-role-name {
    display: inline;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kol-mrd-role-rank {
    display: inline;
    background: #2d7c2d;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 2px;
    line-height: 1;
    white-space: nowrap;
}

html.light-mode .kol-mrd-role-rank {
    background: #2d7c2d;
    color: white;
}

html.dark-mode .kol-mrd-role-rank {
    background: #2d7c2d;
    color: white;
}

.kol-mrd-inline {
    display: inline-flex;
    gap: 8px;
    margin-left: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* START: Points Display */

.kol-mrd-points-display {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
}

html.light-mode .kol-mrd-points-display {
    color: #1f2937;
}

html.dark-mode .kol-mrd-points-display {
    color: #e0e0e0;
}

.kol-mrd-points-label {
    font-weight: 700;
}

html.light-mode .kol-mrd-points-label {
    color: #666;
}

html.dark-mode .kol-mrd-points-label {
    color: #a0a0a0;
}

.kol-mrd-points-value {
    background: #2d7c2d;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
}

/* END: Points Display */

/* START: Role Display Settings Section */

html.light-mode .kol-mrd-settings-section {
    background: white;
    color: #333;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

html.light-mode .kol-mrd-settings-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

html.light-mode .kol-mrd-settings-section > p {
    color: #666;
    margin-bottom: 20px;
}

html.light-mode .kol-mrd-role-visibility-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

html.light-mode .kol-mrd-role-visibility-item {
    padding: 16px;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

html.light-mode .kol-mrd-role-visibility-item:hover {
    border-color: #4CAF50;
    background: #f0f7f0;
}

html.light-mode .kol-mrd-visibility-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

html.light-mode .kol-mrd-visibility-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4CAF50;
    border-radius: 4px;
}

html.light-mode .kol-mrd-role-display-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

html.light-mode .kol-mrd-role-description {
    margin: 8px 0 0 30px;
    color: #666;
    font-size: 13px;
}

html.dark-mode .kol-mrd-settings-section {
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

html.dark-mode .kol-mrd-settings-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #ffffff;
}

html.dark-mode .kol-mrd-settings-section > p {
    color: #b0b0b0;
    margin-bottom: 20px;
}

html.dark-mode .kol-mrd-role-visibility-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

html.dark-mode .kol-mrd-role-visibility-item {
    padding: 16px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #222;
    transition: all 0.3s ease;
}

html.dark-mode .kol-mrd-role-visibility-item:hover {
    border-color: #4CAF50;
    background: #2a3a2a;
}

html.dark-mode .kol-mrd-visibility-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

html.dark-mode .kol-mrd-visibility-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4CAF50;
    border-radius: 4px;
}

html.dark-mode .kol-mrd-role-display-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 15px;
}

html.dark-mode .kol-mrd-role-description {
    margin: 8px 0 0 30px;
    color: #b0b0b0;
    font-size: 13px;
}

/* END: Role Display Settings Section */

/* Search Page Styles */

.kol-mrd-search-page {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.kol-mrd-search-page h1 {
    color: var(--global-title-color);
    margin-bottom: 30px;
}

.kol-mrd-search-page h2 {
    color: var(--global-title-color);
    margin-top: 30px;
    margin-bottom: 20px;
}

.kol-mrd-search-form {
    background: var(--color-theme-white-box);
    border: 1px solid var(--global-border-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.kol-mrd-search-form p {
    margin: 0;
}

.kol-mrd-search-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--global-font-color);
}

.kol-mrd-search-form select {
    width: 100%;
    max-width: 400px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

html.dark-mode .kol-mrd-search-form select {
    border: 2px solid #333333;
    background: #2a2a2a;
    color: #e0e0e0;
}

html.dark-mode .kol-mrd-search-form select:hover {
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

html.dark-mode .kol-mrd-search-form select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

html.dark-mode .kol-mrd-search-form select option {
    background: #2a2a2a;
    color: #e0e0e0;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.6;
}

html.dark-mode .kol-mrd-search-form select option:hover {
    background: #4CAF50;
    color: #ffffff;
}

html.dark-mode .kol-mrd-search-form select option:checked {
    background: #4CAF50;
    color: #ffffff;
}

html.light-mode .kol-mrd-search-form select {
    border: 2px solid #cccccc;
    background: white;
    color: #1f2937;
}

html.light-mode .kol-mrd-search-form select:hover {
    border-color: #2d7c2d;
    box-shadow: 0 4px 12px rgba(45, 124, 45, 0.15);
}

html.light-mode .kol-mrd-search-form select:focus {
    outline: none;
    border-color: #2d7c2d;
    box-shadow: 0 0 0 3px rgba(45, 124, 45, 0.1);
}

html.light-mode .kol-mrd-search-form select option {
    background: white;
    color: #1f2937;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.6;
}

html.light-mode .kol-mrd-search-form select option:hover {
    background: #e8e8e8;
    color: #1f2937;
}

html.light-mode .kol-mrd-search-form select option:checked {
    background: linear-gradient(#2d7c2d, #2d7c2d);
    background-color: #2d7c2d;
    color: white;
}

.kol-mrd-results {
    margin-top: 30px;
}

/* START Compact Horizontal Grid Cards */

.kol-mrd-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.kol-mrd-member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #1e1e1e;
    border: 1px solid #333333;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.kol-mrd-member-card:hover {
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.15);
    transform: translateY(-2px);
    border-color: #4CAF50;
}

.kol-mrd-member-avatar {
    margin-bottom: 10px;
    flex-shrink: 0;
}

.kol-mrd-member-avatar a {
    display: block;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.08);
}

.kol-mrd-member-avatar a:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.15);
}

.kol-mrd-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kol-mrd-member-details {
    width: 100%;
    margin-bottom: 8px;
}

.kol-mrd-member-name {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 3px;
    transition: color 0.3s ease;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.kol-mrd-member-name:hover {
    color: #4CAF50;
}

.kol-mrd-member-username {
    display: block;
    color: #a0a0a0;
    font-size: 11px;
    margin-bottom: 6px;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.kol-mrd-member-points {
    display: block;
    color: #2d7c2d;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

/* START: Member Action Button */

.kol-mrd-member-action {
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid #333333;
}

.kol-mrd-member-action button {
    width: 100% !important;
    display: block !important;
}

html.light-mode .kol-mrd-member-action {
    border-top-color: #e0e0e0;
}

/* END: Member Action Button */

html.dark-mode .kol-mrd-search-form {
    background: #1e1e1e;
    border-color: #333333;
}

html.dark-mode .kol-mrd-member-card {
    background: #1e1e1e;
    border-color: #333333;
    color: #e0e0e0;
}

html.dark-mode .kol-mrd-member-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.2);
}

html.light-mode .kol-mrd-member-card {
    background: white;
    border-color: #e0e0e0;
}

html.light-mode .kol-mrd-member-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.12);
}

html.dark-mode .kol-mrd-member-name {
    color: #ffffff;
}

html.dark-mode .kol-mrd-member-name:hover {
    color: #4CAF50;
}

html.light-mode .kol-mrd-member-name {
    color: #1f2937;
}

html.light-mode .kol-mrd-member-name:hover {
    color: #2d7c2d;
}

html.dark-mode .kol-mrd-member-username {
    color: #a0a0a0;
}

html.light-mode .kol-mrd-member-username {
    color: #707070;
}

html.dark-mode .kol-mrd-member-points {
    color: #5fb85f;
}

html.light-mode .kol-mrd-member-points {
    color: #2d7c2d;
}

/* END Compact Horizontal Grid Cards */

/* Pagination Styles */

.kol-mrd-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    padding: 20px 0;
}

.kol-mrd-pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.kol-mrd-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    cursor: pointer;
}

html.dark-mode .kol-mrd-page-link {
    background: #2a2a2a;
    border: 1px solid #333;
    color: #a0a0a0;
}

html.dark-mode .kol-mrd-page-link:hover:not(.active) {
    background: #333;
    border-color: #4CAF50;
    color: white;
}

html.dark-mode .kol-mrd-page-link.active {
    background: #2d7c2d;
    border-color: #2d7c2d;
    color: white;
}

html.light-mode .kol-mrd-page-link {
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #666;
}

html.light-mode .kol-mrd-page-link:hover:not(.active) {
    background: #e8e8e8;
    border-color: #4CAF50;
    color: #333;
}

html.light-mode .kol-mrd-page-link.active {
    background: #2d7c2d;
    border-color: #2d7c2d;
    color: white;
}

/* Responsive Design */

@media (max-width: 1024px) {
    .kol-mrd-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .kol-mrd-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .kol-mrd-member-card {
        padding: 10px;
    }

    .kol-mrd-member-avatar a {
        width: 65px;
        height: 65px;
    }

    .kol-mrd-member-name {
        font-size: 11px;
    }

    .kol-mrd-member-username {
        font-size: 10px;
    }

    .kol-mrd-member-points {
        font-size: 9px;
    }

    .kol-mrd-page-link {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .kol-mrd-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .kol-mrd-member-card {
        padding: 8px;
    }

    .kol-mrd-member-avatar a {
        width: 60px;
        height: 60px;
    }

    .kol-mrd-member-avatar {
        margin-bottom: 6px;
    }

    .kol-mrd-member-name {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .kol-mrd-member-username {
        font-size: 9px;
        margin-bottom: 4px;
    }

    .kol-mrd-member-points {
        font-size: 8px;
        margin-bottom: 4px;
    }

    .kol-mrd-page-link {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .kol-mrd-pagination {
        gap: 4px;
    }
}

/* END KOL Member Role Display Frontend */
