.comment-section {
    max-width: 85rem;
    margin: 0 auto;
    padding-top: 5rem;
}

.comment-section-title {
    text-align: center;
    color: #2c0f66;
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 3.1875rem;
    letter-spacing: -0.03375rem;
    text-transform: capitalize;
    margin-bottom: 2.5rem;
}

#comment-app {
    width: 100%;
    padding: 2.5rem 2.75rem 3.79rem;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 1px 33.6px 0 rgba(107, 107, 107, 0.09);
}

#comment-app p {
    color: #020b27;
    font-size: 1.25rem;
    font-weight: 450;
    line-height: 133.3%;
}

#comment-app p span {
    color: #657384;
    font-size: 1rem;
    font-weight: 450;
    line-height: 150%;
}

/* Comment Form Section */
.comment-form-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.comment-form-wrapper {
    display: flex;
}

.avatar-section {
    flex-shrink: 0;
    margin-right: 1.19rem;
}

.user-avatar {
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-avatar img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

img.fallback-avatar-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.form-content {
    flex: 1;
    position: relative;
    padding: 1.5rem 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(126, 126, 126, 0.17);
    background: #fff;
}

.input-group:not(:first-child) {
    margin-top: 1.25rem;
}

.tox-toolbar__primary {
	opacity: 0;
	pointer-events: none;
    height: 3.38rem !important;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: var(--Padding-Small, 0.75rem) var(--Padding-Medium, 1rem);
    border-radius: var(--Spacing-32, 2rem);
    background: #f7f7f7;
	color: #393939;
    font-size: 0.875rem;
    font-weight: 450;
    line-height: 160%;
    letter-spacing: -0.02725rem;
    border: none;
    outline: none;
}

.input-group input::placeholder {
    color: rgba(0, 18, 36, 0.38);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border: none;
}

.input-group input {
    height: 3.3125rem;
}

.input-group input[readonly] {
    background: #f8f9fa;
    color: #393939;
    cursor: not-allowed;
}

.input-group textarea {
    min-height: 10.8125rem;
    resize: vertical;
    font-family: inherit;
}

/* Format Toolbar - Hidden since we're using TinyMCE */
.format-toolbar {
    display: none;
}

/* TinyMCE Custom Styling */

.tox:not(.tox-tinymce-inline) .tox-editor-header {
    box-shadow: none !important;
    padding: 1.25rem 0 0 0 !important;
    margin-top: 1.25rem !important;
    border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
}

.tox .tox-toolbar__group {
    padding: 0 !important;
}
.tox .tox-tbtn {
    margin: 0 !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
}

.tox-tbtn__icon-wrap {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

.tox-tbtn__icon-wrap::before {
    content: "";
    display: block;
    width: 100% !important;
    height: 100% !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

button[aria-label="Insert/edit link"] .tox-tbtn__icon-wrap::before {
    background-image: url("/wp-content/uploads/2025/08/link.svg");
}

button[aria-label="Italic"] .tox-tbtn__icon-wrap::before {
    background-image: url("/wp-content/uploads/2025/08/italic.svg");
}

button[aria-label="Bold"] .tox-tbtn__icon-wrap::before {
    background-image: url("/wp-content/uploads/2025/08/bold.svg");
}

.tox .tox-tbtn {
    border-radius: 0 !important;
}

.tox-tbtn__icon-wrap svg {
    display: none !important;
}

.tox-tbtn__icon-wrap svg path {
    fill: #657384 !important;
}

.tox .tox-editor-container {
    flex-direction: column-reverse !important;
}

.tox .tox-edit-area {
    border: none !important;
    border-radius: 0 !important;
}

.tox .tox-edit-area__iframe {
    background-color: #fff !important;
}

.tox-tinymce {
    border-radius: 0 !important;
    border: none !important;
}
.tox .tox-edit-area {
    border-radius: 2rem !important;
}
.tox .tox-tbtn {
    margin-right: 0.9rem !important;
    border-radius: 0.25rem !important;
}

.tox .tox-tbtn--enabled {
    background-color: transparent !important;
}

.tox .tox-tbtn--enabled .tox-tbtn__icon-wrap::before {
    filter: brightness(0) saturate(100%) invert(24%) sepia(17%) saturate(3921%)
        hue-rotate(234deg) brightness(97%) contrast(94%);
}

/* Submit Button */
.submit-section {
    flex-shrink: 0;
    position: absolute;
    right: 1.25rem;
    bottom: 1.5rem;
    z-index: 10;
}

.submit-btn {
    border: none;
    height: 3.375rem;
    padding: 0.25rem 0.1875rem 0.25rem 1.4375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    border-radius: 3.25rem;
    /* box-shadow: 0 4px 51.6px 0 rgba(210, 210, 210, 0.25); */
    background: #fff;
}

.submit-btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tm-main, #5b378f);
    font-size: 1rem;
    font-style: normal;
    font-weight: 450;
    letter-spacing: -0.02725rem;
    padding-right: 1.31rem;
    border-right: 1px solid rgba(0, 0, 0, 0.07);
}

.submit-btn-icon {
    position: relative;
    width: 2.6465rem;
    height: 2.6465rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn-icon::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    background-color: transparent;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.submit-btn-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(25%) sepia(44%) saturate(1009%)
        hue-rotate(225deg) brightness(98%) contrast(99%);
}

.tox .tox-edit-area::before {
    display: none !important;
}

/* Comments List */
#comment-list {
    margin-top: 2rem;
    position: relative;
    max-height: 50rem;
    overflow-y: auto;
}
#comment-list::-webkit-scrollbar {
    width: 0.75rem;
}

/* Track */
#comment-list::-webkit-scrollbar-thumb {
    border-radius: 0.75rem;
    background: #7c58b159;
}
.comment-item {
    position: relative;
    z-index: 2;
}

.comment-item:not(:first-child) {
    margin-top: 3.51rem;
}

.comment-header {
    display: flex;
}

.comment-avatar {
    position: relative;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    margin-right: 1.18rem;
}

.fallback-avatar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.comment-avatar .avatar {
    position: relative;
    z-index: 2;
}
.comment-avatar.user {
    background: #20b2aa;
}

.comment-avatar.admin {
    /*     background: #7c3aed; */
}

.comment-avatar.admin + .comment-info .comment-author {
    background: var(
        --GRA-PURPLE,
        linear-gradient(90deg, #5b378f 0%, #7c58b1 100%)
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.comment-avatar svg {
    width: 24px;
    height: 24px;
}

.comment-info {
    flex: 1;
}

.comment-author {
    color: #000;
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 450;
    line-height: 1.8125rem; /* 145% */
    letter-spacing: -0.03794rem;
    margin-bottom: 0.75rem;
}

.comment-badge {
    position: relative;
    padding: 0.25rem 0.875rem;
    margin-left: 0.75rem;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 450;
    line-height: 150%; /* 1.3125rem */
    border-radius: 0.5rem;
    background: #6c0072;
    overflow: hidden;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.comment-badge::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250, 232, 253, 0.74);
    z-index: -1;
    border-radius: 0.5rem;
}

.comment-time {
    display: flex;
    align-items: center;
    color: var(--Grey-Normal, #454545);
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 325;
    line-height: 1.5rem; /* 171.429% */
}

.comment-reply-link::before {
    content: "•";
    display: inline-block;
    color: var(--Primary-50, #1550e5);
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5rem; /* 171.429% */
    margin-left: 0.75rem;
    margin-right: 0.75rem;
}

.comment-reply-link {
	cursor: pointer;
    color: var(--Primary-50, #1550e5);
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5rem; /* 171.429% */
}

.comment-delete-link {
    color: var(--Error-50, #ef4444);
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5rem; /* 171.429% */
    margin-left: 0.75rem;
}

/* Popup Confirm Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-confirm {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 25rem;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.show .popup-confirm {
    transform: scale(1);
}

.popup-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.popup-message {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.popup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.popup-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 5rem;
}

.popup-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.popup-btn-cancel:hover {
    background: #e5e7eb;
}

.popup-btn-confirm {
    background: #ef4444;
    color: white;
}

.popup-btn-confirm:hover {
    background: #dc2626;
}

.comment-content {
    color: var(--Grey-Normal, #454545);
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 450;
    line-height: 160%; /* 1.4rem */
    letter-spacing: -0.02725rem;
    margin-bottom: 0.75rem;
}
.comment-content a {
	color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));
    text-decoration: underline;
}
/* Reply Section */
.reply-section {
    margin-left: 4rem;
    margin-top: 3.39rem;
}

/* Toast Notification Styles */
.notification {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    font-size: 1rem;
    font-weight: 450;
    line-height: 1.5rem;
    z-index: 10000;
    max-width: 25rem;
    min-width: 18.75rem;
    transform: translateX(100%) scale(0.95);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    border: none;
    background: white;
}

.notification.success {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid #bbf7d0;
}

.notification.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fef2f2 100%);
    border: 1px solid #fecaca;
}

.notification.info {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #bfdbfe;
}

.notification.warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fed7aa;
}

/* Toast animation */
.notification.show {
    transform: translateX(0) scale(1);
}

/* Toast header */
.notification::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--toast-color) 0%,
        var(--toast-color-light) 100%
    );
}

.notification.success::before {
    --toast-color: #10b981;
    --toast-color-light: #34d399;
}

.notification.error::before {
    --toast-color: #ef4444;
    --toast-color-light: #f87171;
}

.notification.info::before {
    --toast-color: #3b82f6;
    --toast-color-light: #60a5fa;
}

.notification.warning::before {
    --toast-color: #f59e0b;
    --toast-color-light: #fbbf24;
}

/* Toast content */
.notification .toast-content {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
}

/* Toast icon */
.notification .toast-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--toast-color);
    color: white;
    font-size: 0.875rem;
    font-weight: 450;
}

.notification.success .toast-icon {
    --toast-color: #10b981;
}

.notification.error .toast-icon {
    --toast-color: #ef4444;
}

.notification.info .toast-icon {
    --toast-color: #3b82f6;
}

.notification.warning .toast-icon {
    --toast-color: #f59e0b;
}

/* Toast message */
.notification .toast-message {
    flex: 1;
    color: #1f2937;
    font-size: 0.875rem;
    line-height: 1.5rem;
    margin: 0;
    padding-right: 1.5rem;
}

/* Toast close button */
.notification .toast-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1rem;
    font-weight: 450;
    transition: all 0.2s ease;
    opacity: 0.7;
}

/* Multiple toasts stacking */
.notification + .notification {
    margin-top: 1rem;
}
.tox .tox-toolbar--scrolling {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}

.tox .tox-toolbar,
.tox .tox-toolbar__overflow,
.tox .tox-toolbar__primary {
    background: transparent !important;
}
@media (min-width: 1024.1px) {
    .tox .tox-tbtn:hover,
    .tox .tox-tbtn--enabled:hover {
        background-color: transparent !important;
    }
    .tox .tox-tbtn:hover .tox-tbtn__icon-wrap::before,
    .tox .tox-tbtn--enabled:hover .tox-tbtn__icon-wrap::before {
        filter: brightness(0) saturate(100%) invert(24%) sepia(17%)
            saturate(3921%) hue-rotate(234deg) brightness(97%) contrast(94%);
    }
    .submit-btn:hover .submit-btn-icon::before {
        background-color: #5b378f;
    }

    .submit-btn:hover .submit-btn-icon img {
        filter: brightness(0) saturate(100%) invert(100%) sepia(0%)
            saturate(6834%) hue-rotate(257deg) brightness(111%) contrast(94%);
    }
    .submit-btn:hover .submit-btn-text {
        border-color: transparent;
    }
    .comment-reply-link:hover {
        text-decoration: underline;
    }
    .comment-delete-link:hover {
        text-decoration: underline;
    }
    .notification .toast-close:hover {
        background: rgba(0, 0, 0, 0.1);
        color: #374151;
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Responsive */
@media (max-width: 639.98px) {
    .comment-section {
        max-width: 100%;
        padding: 3rem 1rem 2rem;
    }
    .comment-section-title {
        font-size: 1.375rem;
        font-style: normal;
        font-weight: 400;
        line-height: 150%; /* 2.0625rem */
        letter-spacing: -0.0275rem;
        text-transform: capitalize;
        margin-bottom: 1.25rem;
    }
    .avatar-section {
        display: none;
    }
    .comment-form-wrapper {
        flex-direction: column;
    }
    #comment-app {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        border-radius: 1rem;
        background: #fff;
        box-shadow: 0 1px 30px 0 rgba(61, 56, 120, 0.1);
    }
    #comment-app p {
        order: 1;
        font-size: 1.125rem;
        font-style: normal;
        font-weight: 400;
        line-height: 130%; /* 1.4625rem */
    }

    #comment-app p span {
        font-size: 1.125rem;
        font-style: normal;
        font-weight: 400;
        line-height: 130%; /* 1.4625rem */
    }
    #comment-list::-webkit-scrollbar {
        width: 0.25rem;
    }
    .comment-content {
        color: var(--grey-dark-active, #1f1f1f);
        font-size: 0.875rem;
        font-style: normal;
        font-weight: 325;
        line-height: 150%; /* 1.3125rem */
        letter-spacing: -0.00875rem;
        margin-bottom: 1rem;
    }
    .comment-time {
        color: var(--Gray-text, #afafaf);
        font-size: 0.875rem;
        font-style: normal;
        font-weight: 450;
        line-height: 160%; /* 1.4rem */
        letter-spacing: -0.02725rem;
    }
    .comment-reply-link {
        color: #004ab8;
        font-size: 0.875rem;
        font-style: normal;
        font-weight: 700;
        line-height: 150%; /* 1.3125rem */
    }
    .comment-delete-link {
        font-size: 0.875rem;
        font-style: normal;
        font-weight: 700;
        line-height: 150%; /* 1.3125rem */
    }
    .comment-author {
        display: flex;
        flex-direction: column;
    }
    .comment-badge {
        margin-top: 0.38rem;
        margin-left: 0;
        align-self: flex-start;
        font-size: 0.75rem;
        font-style: normal;
        font-weight: 450;
        line-height: 140%; /* 1.05rem */
        letter-spacing: -0.0225rem;
        padding: 0.25rem 0.875rem;
    }
    .comment-avatar {
        width: 2rem;
        height: 2rem;
		margin-right: 0.75rem;
    }

    .comment-author {
        color: var(--Grey-Normal, #454545);
        font-size: 1rem;
        font-style: normal;
        font-weight: 450;
        line-height: 1.5rem; /* 150% */
        letter-spacing: -0.01rem;
        margin-bottom: 1rem;
    }

    #comment-list {
        order: 2;
        max-height: 27rem;
        overflow-x: hidden;
		padding-right: 0.5rem;
    }

    .comment-form-section {
        order: 3;
    }
    .submit-section {
        bottom: 0.5rem;
        right: 0.5rem;
    }
    .submit-btn {
        padding: 0;
        background: transparent;
        border-radius: 0;
        height: 2.65rem;
    }
    .tox:not(.tox-tinymce-inline) .tox-editor-header {
        margin-top: 0.44rem !important;
        padding-top: 0.44rem !important;
    }
    .tox .tox-toolbar--scrolling {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }
    .submit-btn-text {
        font-size: 0.75rem;
        font-style: normal;
        font-weight: 450;
        line-height: 140%; /* 1.05rem */
        letter-spacing: -0.0225rem;
        padding-right: 0.69rem;
    }
    .reply-section {
        margin-left: 1.81rem;
        margin-top: 2.2rem;
    }

    .tox .tox-tbtn {
        width: 1.11294rem !important;
        height: 1.11294rem !important;
    }

    .login-actions {
        flex-direction: column;
    }

    .login-btn,
    .register-btn {
        justify-content: center;
    }
    .comment-form-section {
        margin-top: 1.62rem;
        padding-top: 0;
        border-top: none;
    }

    .form-content {
        padding: 1.1875rem 1.25rem;
        border-radius: 0.5rem;
        border: 1px solid rgba(126, 126, 126, 0.17);
        background: #fff;
    }

    .input-group input,
    .input-group textarea {
        border-radius: var(--Spacing-32, 2rem);
        background: #f7f7f7;
        font-size: 0.75rem;
        font-style: normal;
        font-weight: 450;
        line-height: 140%; /* 1.05rem */
        letter-spacing: -0.0225rem;
    }
    .input-group input {
        height: 2.5rem;
    }

    .input-group:not(:first-child) {
        margin-top: 0.41rem;
    }

    .input-group textarea {
        min-height: 7.5rem;
    }

    .notification {
        right: 16px;
        left: 16px;
        max-width: none;
        min-width: auto;
        transform: translateY(-100%) scale(0.95);
    }

    .notification.show {
        transform: translateY(0) scale(1);
    }

    /* Mobile popup styles */
    .popup-confirm {
        padding: 1.5rem;
        max-width: 20rem;
    }

    .popup-title {
        font-size: 1.125rem;
    }

    .popup-message {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .popup-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .popup-btn {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        min-width: auto;
        width: 100%;
    }
}
