/* Variables */
:root {
    --mce-primary: #007bff;
    --mce-primary-dark: #0056b3;
    --mce-text: #1a1a1a;
    --mce-text-light: #666;
    --mce-bg: #ffffff;
    --mce-bg-alt: #f8f9fa;
    --mce-border: #e9ecef;
    --mce-radius: 12px;
    --mce-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --mce-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset & Base */
.mce-comments-wrapper {
    font-family: var(--mce-font);
    margin: 40px 0;
    color: var(--mce-text);
}

.mce-comments-wrapper * {
    box-sizing: border-box;
}

/* Teaser Section */
.mce-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.mce-section-header h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--mce-text-light);
    margin: 0;
}

.mce-comment-count {
    font-size: 13px;
    font-weight: 600;
    background: var(--mce-bg-alt);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Cards */
.mce-card {
    background: var(--mce-bg);
    border: 1px solid var(--mce-border);
    border-radius: var(--mce-radius);
    padding: 20px;
    box-shadow: var(--mce-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.mce-teaser-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.mce-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.mce-avatar-wrapper svg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 14px;
}

.mce-user-info {
    display: flex;
    flex-direction: column;
}

.mce-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mce-author-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--mce-text);
}

.mce-time-ago {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* Badges */
.mce-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    gap: 4px;
}

.mce-verified {
    background: rgba(29, 161, 242, 0.1);
    color: #1DA1F2;
}

.mce-badge svg {
    width: 12px;
    height: 12px;
}

/* Content */
.mce-card-body {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

/* Buttons */
.mce-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    gap: 8px;
}

.mce-btn-primary {
    background: var(--mce-primary);
    color: white;
}

.mce-btn-primary:hover {
    background: var(--mce-primary-dark);
}

.mce-btn-block {
    width: 100%;
}

.mce-icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--mce-text-light);
}

/* Main Container (Hidden initially) */
.mce-main-container {
    display: none;
    margin-top: 30px;
    border-top: 1px solid var(--mce-border);
    padding-top: 30px;
    animation: mceFadeIn 0.3s ease;
}

.mce-main-container.active {
    display: block;
}

.mce-container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Comment List */
.mce-comment-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--mce-border);
}

.mce-comment-item:last-child {
    border-bottom: none;
}

/* Skeleton Loader */
.mce-skeleton-loader {
    margin-top: 20px;
}

.mce-skeleton-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.mce-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #eee;
    animation: mcePulse 1.5s infinite;
}

.mce-skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mce-skeleton-line {
    height: 12px;
    background: #eee;
    border-radius: 6px;
    animation: mcePulse 1.5s infinite;
}

.w-30 {
    width: 30%;
}

.w-60 {
    width: 60%;
}

.w-80 {
    width: 80%;
}

/* Animations */
@keyframes mceFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mcePulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Empty State */
.mce-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: var(--mce-bg-alt);
    border-radius: var(--mce-radius);
}

.mce-empty-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

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

.mce-load-more-btn {
    background: white;
    border: 1px solid var(--mce-border);
    padding: 8px 24px;
    border-radius: 20px;
    color: var(--mce-text);
    font-weight: 500;
    cursor: pointer;
}

.mce-load-more-btn:hover {
    background: var(--mce-bg-alt);
}

/* Rules Checkbox */
.mce-rules-checkbox {
    margin: 15px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mce-rules-checkbox input {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.mce-rules-checkbox a {
    color: var(--mce-primary);
    text-decoration: none;
    font-weight: 500;
}

.mce-rules-checkbox a:hover {
    text-decoration: underline;
}

/* Modal */
.mce-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mce-modal.active {
    opacity: 1;
    visibility: visible;
}

.mce-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.mce-modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.mce-modal.active .mce-modal-content {
    transform: translateY(0);
}

.mce-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--mce-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mce-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.mce-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.mce-modal-body {
    padding: 20px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}

.mce-modal-body ul {
    margin: 0;
    padding-left: 20px;
}

.mce-modal-body li {
    margin-bottom: 8px;
}

.mce-modal-footer {
    padding: 20px;
    border-top: 1px solid var(--mce-border);
    text-align: right;
}

.mce-modal-accept {
    padding: 10px 20px;
    font-size: 14px;
}

/* Form Styling */
.mce-form-wrapper input[type="text"],
.mce-form-wrapper input[type="email"],
.mce-form-wrapper textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--mce-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    margin-bottom: 15px;
    background: #fdfdfd;
}

.mce-form-wrapper input:focus,
.mce-form-wrapper textarea:focus {
    outline: none;
    border-color: var(--mce-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.mce-form-footer {
    margin-top: 10px;
}

.comment-form-author,
.comment-form-email {
    width: 48%;
    display: inline-block;
    margin-right: 2%;
}

.comment-form-email {
    margin-right: 0;
}

@media (max-width: 600px) {

    .comment-form-author,
    .comment-form-email {
        width: 100%;
        margin-right: 0;
    }
}