.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Dropdowns (Custom implementation replacement for Bootstrap) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    list-style: none;
    padding: 5px 0;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: .25rem;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu li a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-menu li a:hover {
    background-color: #f1f1f1;
}

/* Buttons adjustments */
.btn-link {
    background: none;
    border: none;
    color: inherit;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* Comments Section specific */
.user-comment {
    display: flex;
    margin-bottom: 20px;
}

.user-icon {
    margin-right: 15px;
}

.img-circle {
    border-radius: 50%;
}

.user-comment-body {
    flex: 1;
    overflow-wrap: break-word;
    /* Prevent long words from breaking layout */
    min-width: 0;
    /* Flexbox trick for text overflow */
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #777;
}

.user-name {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.comment-text {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Ensure CKEditor content in comments doesn't overflow */
.comment-text img,
.comment-text p img {
    max-width: 100% !important;
    height: auto !important;
}

.comment-likes-reply {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    align-items: center;
    flex-wrap: wrap;
}

.replyCkeditor {
    width: 100%;
    flex-basis: 100%;
    margin-top: 10px;
}

.replyCkeditor:empty {
    display: none;
}

.btns-editor-close-reply {
    width: 100%;
    flex-basis: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btns-editor-close-reply:empty {
    display: none;
}

/* Sidebar Widgets */
.content-articleslist-widget,
.content-socials-widget {
    width: 100%;
    clear: both;
    display: block;
    margin-bottom: 30px;
    overflow: hidden;
    /* Ensure content stays within box */
}

/* Post Detail Specifics based on old layout */
.right-column-wrap aside {
    margin-bottom: 30px;
    display: block;
    width: 100%;
}

.content-header-of-widget h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 20px 0;
    border-bottom: 2px solid #A65D47;
    /* Theme color */
    padding-bottom: 10px;
    display: block;
    width: 100%;
}

.content-header-of-widget h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Social Buttons */
.social-btn a {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.social-btn a:hover {
    color: #A65D47;
}

/* Related articles */
.card-article-horizontal {
    display: flex;
    margin-bottom: 15px;
}

.card-article-horizontal .image-container {
    width: 120px;
    height: auto;
    margin-right: 10px;
    flex-shrink: 0;
}

.card-article-horizontal .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.listitem-wrapper {
    flex: 1;
}

.listitem-wrapper a {
    font-weight: 600;
    display: block;
    line-height: 1.2;
    margin-bottom: 5px;
}

.listitem-data {
    font-size: 0.8em;
    color: #777;
}

/* Minimalist Button Styles from old code */
.minimalistBtn,
.minimalistBtnGreySmall,
.minimalistBtnDarkSmall {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.minimalistBtn:hover,
.minimalistBtnGreySmall:hover,
.minimalistBtnDarkSmall:hover {
    background: #f5f5f5;
}

.minimalistBtn.bgdark,
.minimalistBtnDarkSmall {
    background: #333;
    color: #fff;
    border-color: #333;
}

.minimalistBtn.bgdark:hover,
.minimalistBtnDarkSmall:hover {
    background: #000;
}

.minimalistBtnGreySmall {
    font-size: 0.8rem;
    padding: 4px 10px;
}

/* Comments List */
#commentsList,
.comments_replies_ul {
    list-style: none;
    padding: 0;
}

.comments_replies_ul {
    margin-left: 40px;
    border-left: 2px solid #f0f0f0;
    padding-left: 15px;
    margin-top: 10px;
}

/* Loader */
.my-custom-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}