button[data-attach-loading] {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.flex-1 {
    flex: 1;
}

.white-space-pre-wrap {
    white-space: pre-wrap;
}

/* FAB Buttons */
.fab-container {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.fab-button {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    color: white;
    padding: 12px 24px;
}

.fab-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.fab-add {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 24px;
    padding: 0;
}

.fab-save {
    background: #696cff;
    border-radius: 50rem;
    gap: 8px;
}

.fab-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    min-width: 280px;
    max-height: 500px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.fab-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.fab-menu-item:hover {
    background: #f5f5f9;
}

.fab-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fab-menu-item.disabled:hover {
    background: white;
}

.item-count {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

/* Draggable Items */
.draggable-item {
    background: white;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: move;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0px;
}

.draggable-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #696cff;
}

.draggable-item.sortable-ghost {
    opacity: 0.4;
    background: #f5f5f9;
}

.drag-handle {
    color: #999;
    font-size: 20px;
    cursor: move;
}

.item-content {
    flex: 1;
}

.item-actions {
    display: flex;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 0 20px 40px 20px;
    color: #999;
}

.empty-state>i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

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

.section-count {
    font-size: 14px;
    color: #999;
    font-weight: 500;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

.card {
    scroll-margin-top: 100px;
}

/* Section header with add button */

.section-header .badge {
    font-size: 13px;
    padding: 6px 10px;
    margin-left: 10px;
}

/* Responsive item-actions */
@media (max-width: 767.98px) {
    .draggable-item {
        flex-wrap: wrap;
    }

    .item-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #e7e7e7;
    }

    .container-xxl {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card {
        margin-bottom: 1rem !important;
    }

    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .draggable-item {
        padding: 10px;
        margin-bottom: 8px;
    }
}

/* Product image preview */
.product-image-preview {
    width: 100%;
    max-width: 200px;
    margin-top: 10px;
    border-radius: 8px;
    display: none;
}

.product-image-preview.show {
    display: block;
}

/* Custom switch size */
.form-switch .form-check-input {
    width: 2.5em;
    height: 1.25em;
}

/* Social media icons */
.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.social-icon.facebook {
    background: #3b5998;
}

.social-icon.zalo {
    /* background: #0068ff; */
}

.social-icon.linkedin {
    background: #0077b5;
}

.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon.youtube {
    background: #ff0000;
}

.social-icon.x {
    background: #000000;
}

.social-icon.whatsapp {
    background: #25d366;
}

.social-icon.telegram {
    background: #0088cc;
}

.social-icon.tiktok {
    background: #000000;
}

.social-icon.website {
    background: #696cff;
}

/* Input with counter */
.input-with-counter {
    position: relative;
}

.input-with-counter input,
.input-with-counter textarea {
    padding-right: 60px;
}

.input-counter {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #999;
    pointer-events: none;
    background: white;
    padding: 2px 4px;
}

.input-with-counter textarea+.input-counter {
    top: 12px;
    transform: none;
}


/* Loading state for save button */
.fab-button.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.fab-button .spinner-border {
    margin-right: 0.25rem;
}

/* Mobile drag and drop improvements */
.drag-handle {
    cursor: move;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    padding: 0.5rem;
    margin: -0.5rem 0rem -0.5rem -0.5rem;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Increase touch target on mobile */
@media (max-width: 768px) {
    .drag-handle {
        font-size: 1.5rem;
        padding: 0.75rem;
        margin: -0.75rem 0rem -0.75rem -0.75rem;
    }

    .draggable-item {
        touch-action: pan-y;
    }
}

/* Sortable ghost and chosen states */
.sortable-ghost {
    opacity: 0.4;
    background-color: #f0f0f0;
}

.sortable-chosen {
    background-color: #f8f9fa;
}

.sortable-fallback {
    opacity: 0.8;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* Crop modal styling */
#imageCropModal .modal-body {
    padding: 1.5rem;
}

#imageCropModal img {
    max-width: 100%;
    display: block;
}

/* Ensure cropper container doesn't overflow */
#imageCropModal .cropper-container {
    max-height: 500px;
}

/* Edit button hover effect */
#avatar-edit-btn:hover,
#cover-edit-btn:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}