.loop-tabs-widget {
    width: 100%;
    margin: 20px 0;
}

/* ========== Tabs 模式樣式 ========== */
.tabs {
    display: flex;
    flex-direction: row; /* 可切換為 'column' 來達到垂直佈局 */
    margin-bottom: 15px;
}

.tab {
    padding: 10px 15px;
    margin-right: 5px;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tab:hover,
.tab.active {
    background-color: #197A3B;
    color: #ffffff;
}

/* ========== Dropdown 模式樣式 ========== */
.dropdown-selector {
    margin-bottom: 15px;
}

.loop-tabs-dropdown {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ========== Dropdown 位置設定 ========== */
.dropdown-selector {
    display: flex;
}

/* 拉伸模式下 dropdown 佔滿寬度 */
.dropdown-selector[style*="justify-content: stretch"] .loop-tabs-dropdown {
    max-width: unset !important;
    min-width: 100%;
    width: 100%;
}

.loop-tabs-dropdown:focus {
    outline: none;
    border-color: #197A3B;
    box-shadow: 0 0 5px rgba(25, 122, 59, 0.3);
}

.loop-tabs-dropdown:hover {
    border-color: #197A3B;
}

/* ========== 根據 display_type 隱藏對應元素 ========== */
.display-dropdown .tabs {
    display: none;
}

.display-tabs .dropdown-selector {
    display: none;
}

/* ========== 垂直佈局支援 ========== */
.layout-vertical .tabs-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}

.layout-vertical .tabs {
    flex-direction: column;
    flex: 0 0 200px; /* 固定寬度 200px */
    min-width: 150px;
}

.layout-vertical .tabs-content {
    flex: 1;
    margin-bottom: 0;
}

.layout-vertical .tab {
    margin-right: 0;
    margin-bottom: 5px;
    width: 100%;
}

/* ========== 內容區域樣式 ========== */
.tabs-content .tab-content {
    display: none;
}

.tabs-content .tab-content.active {
    display: block;
    background-color: #ffffff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
