/* 防止FOUC (Flash of Unstyled Content) */
html {
    visibility: hidden;
    opacity: 0;
}

/* 頁面加載完成後顯示 */
html.loaded {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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



/* 模態框基礎樣式 - 防止初始化閃爍 */
.modal-common {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-common.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-content-common {
    position: relative;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 450px;
    margin: 32px auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-common.show .modal-content-common {
    transform: scale(1);
}


/* 移動裝置樣式 */
@media (max-width: 576px ) {
    .modal-content-common {
        max-width: 90%;
        margin: 20px auto;
    }
} 

@media (min-width: 1400px) {
    .container2 {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/**
 * Cursor Pointer Styles
 * Ensure all clickable elements show the pointer cursor
 */

/* Interactive elements that should show pointer cursor */
button,
.button,
.btn,
[role="button"],
input[type="submit"],
input[type="button"],
input[type="reset"],
select[onclick],
textarea[onclick],
a[href],
a[role="link"],
.clickable,
.tab-link,
.tab-item,
.nav-link,
.dropdown-toggle,
.modal-close,
.image-zoom,
.star-rating input[type="radio"],
.favorite-btn,
.like-btn,
.share-btn,
.comment-btn,
.edit-btn,
.delete-btn,
.report-btn,
.claim-btn,
.post-btn,
.review-btn,
.search-btn,
.filter-btn,
.sort-btn,
.pagination a,
.breadcrumb-item a,
.tag-link,
.category-link,
.user-link,
.clinic-link,
.doctor-link {
    cursor: pointer !important;
}

/* Elements that might have custom cursors (don't override these) */
.cursor-grab {
    cursor: grab !important;
}

.cursor-grabbing {
    cursor: grabbing !important;
}

.cursor-zoom-in {
    cursor: zoom-in !important;
}

.cursor-zoom-out {
    cursor: zoom-out !important;
}

.cursor-not-allowed {
    cursor: not-allowed !important;
}

/* Ensure disabled elements show not-allowed cursor */
button:disabled,
input:disabled,
textarea:disabled,
select:disabled,
.button:disabled,
.btn:disabled {
    cursor: not-allowed !important;
}