.custom-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
}

.custom-share-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.custom-share-buttons span {
    font-weight: bold;
}

.custom-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-size: 14px;
}

.custom-btn.facebook { background-color: #395693; }
.custom-btn.twitter { background-color: #000000; }
.custom-btn.telegram { background-color: #27A3E3; }
.custom-btn.whatsapp { background-color: #3FBE4F; }

.custom-shortlink {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-shortlink input {
    width: 200px;
    padding: 5px;
}

.custom-ad {
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 10px;
    margin: 20px 0;
}

.custom-image-link {
    text-align: center;  /* وسط‌چین کردن محتوای داخلی */
}

.custom-image-link img {
    max-width: 100%;
    height: auto;
}


@media (max-width: 768px) {
    .custom-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .custom-shortlink input {
        width: 100%;
    }
}
/* فقط داخل باکس خود افزونه اعمال شود */
.custom-content-box .custom-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
}

.custom-content-box .custom-share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0; /* مهم برای درست شدن overflow داخل flex */
}

.custom-content-box .custom-share-label {
    font-weight: bold;
    flex: 0 0 auto;
    white-space: nowrap;
}

.custom-content-box .custom-share-scroll {
    display: flex;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

/* دکمه‌ها */
.custom-content-box .custom-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.custom-content-box .custom-btn.facebook { background-color: #395693; }
.custom-content-box .custom-btn.twitter  { background-color: #000000; }
.custom-content-box .custom-btn.telegram { background-color: #27A3E3; }
.custom-content-box .custom-btn.whatsapp { background-color: #3FBE4F; }

.custom-content-box .custom-shortlink {
    display: flex;
    align-items: center;
    gap: 10px;
    width: auto;
}

.custom-content-box .custom-shortlink input {
    width: 200px;
    padding: 5px;
}

@media (max-width: 768px) {
    .custom-content-box .custom-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    /* اسکرول افقی فقط برای دکمه‌های شبکه اجتماعی */
    .custom-content-box .custom-share-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    /* یک حس اسکرول کوچک و تمیز */
    .custom-content-box .custom-share-scroll::-webkit-scrollbar {
        height: 4px;
    }

    .custom-content-box .custom-shortlink {
        width: 100%;
    }

    .custom-content-box .custom-shortlink input {
        width: 100%;
    }
}
