/* General body and HTML styling */
html, body {
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}
body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

/* 防止选择不同版本计算器时容器放大 */
.platform-specific-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

form {
    box-sizing: border-box;
    width: 100%;
}

/* Remove spinners from number inputs */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

/* Info icon styling */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.875em; /* 14px if base is 16px */
    height: 0.875em; /* 14px if base is 16px */
    line-height: 0.875em;
    text-align: center;
    border-radius: 50%;
    background-color: #94a3b8; /* slate-400 */
    color: white;
    font-size: 0.7em; /* Smaller font for the icon itself */
    font-weight: bold;
    cursor: help;
    margin-left: 4px;
    vertical-align: middle; /* Align icon with text */
}

/* Tooltip container */
.tooltip {
    position: relative;
    display: inline-block;
}

/* Tooltip text */
.tooltip .tooltiptext {
    visibility: hidden;
    width: 300px; /* Fixed width for tooltip */
    background-color: #1f2937; /* gray-800 */
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 50; /* Ensure tooltip is above other elements */
    bottom: 130%; /* Position tooltip above the icon */
    left: 50%;
    margin-left: -150px; /* Center the tooltip */
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem; /* 12px */
    line-height: 1.5; /* Improved readability */
    box-shadow: 0 2px 8px rgba(0,0,0,0.15); /* Subtle shadow */
}

/* Show the tooltip text when hovering over the tooltip container */
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Section divider style */
.section-divider {
    border-top: 1px dashed #e2e8f0; /* slate-200 */
    margin-top: 1.5rem; /* 24px */
    margin-bottom: 1.5rem; /* 24px */
}

/* Ensure form inputs have a consistent base font size for better mobile UX */
input[type="number"].form-input,
input[type="text"].form-input,
input[type="email"].form-input,
textarea.form-input {
    font-size: 16px !important; /* Override Tailwind's smaller base for inputs if necessary */
}

/* 平台按钮样式 - 直接从补单计算器复制 */
.platform-button {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 12px;
    background-color: #ffffff;
    color: #212529;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    flex: 1 1 calc(33.333% - 10px);
    min-width: 80px;
    text-align: center;
    margin-bottom: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--platform-color, #007bff);
    transition: height 0.2s ease;
}

.platform-button:hover {
    border-color: var(--platform-color, #007bff);
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

/* 激活状态样式 */
.platform-button[data-version="merchant"].active,
.platform-button.is-active-merchant {
    background-color: #2c60ff; /* 蓝色 - 抖店 */
    color: white;
    border-color: #2c60ff;
    --platform-color: #2c60ff;
}

.platform-button[data-version="influencer"].active,
.platform-button.is-active-influencer {
    background-color: #ffcc00; /* 黄色 - 淘宝 */
    color: white;
    border-color: #ffcc00;
    --platform-color: #ffcc00;
}

.platform-button[data-version="store_profit"].active,
.platform-button.is-active-store_profit {
    background-color: #00bb29; /* 绿色 - 快手 */
    color: white;
    border-color: #00bb29;
    --platform-color: #00bb29;
}

/* 设置各按钮的顶部条纹颜色 */
.platform-button[data-version="merchant"]:before {
    background-color: #2c60ff; /* 蓝色 - 抖店 */
    --platform-color: #2c60ff;
}

.platform-button[data-version="influencer"]:before {
    background-color: #ffcc00; /* 黄色 - 淘宝 */
    --platform-color: #ffcc00;
}

.platform-button[data-version="store_profit"]:before {
    background-color: #00bb29; /* 绿色 - 快手 */
    --platform-color: #00bb29;
}

/* 计算按钮样式 */
#merchant-roi-form .calculate-button {
    background-color: #2c60ff; /* 蓝色 - 抖店 */
    border-color: #2c60ff;
}

#influencer-roi-form .calculate-button {
    background-color: #ffcc00; /* 黄色 - 淘宝 */
    border-color: #ffcc00;
}

#store-profit-form .calculate-button {
    background-color: #00bb29; /* 绿色 - 快手 */
    border-color: #00bb29;
}

/* 结果区域样式 */
#merchant-result-area h5 {
    color: #2c60ff; /* 蓝色 - 抖店 */
    border-bottom-color: rgba(44, 96, 255, 0.3);
}

#influencer-result-area h5 {
    color: #ffcc00; /* 黄色 - 淘宝 */
    border-bottom-color: rgba(255, 204, 0, 0.3);
}

#store-profit-result-area h5 {
    color: #00bb29; /* 绿色 - 快手 */
    border-bottom-color: rgba(0, 187, 41, 0.3);
}

/* 媒体查询适配 */
@media (max-width: 768px) {
    .tooltip .tooltiptext {
        width: 180px;
    }
} 
