/* 各欄位寬度設定 */
.content-col {
    width: 32%;
    min-width: 32%;
    max-width: 32%;
}

.audience-col {
    width: 10%;
    min-width: 10%;
    max-width: 10%;
}

.details-col {
    width: 12%;
    min-width: 12%;
    max-width: 12%;
}

.devices-col {
    width: 9%;
    min-width: 9%;
    max-width: 9%;
}

.language-col {
    width: 9%;
    min-width: 9%;
    max-width: 9%;
}

.status-col {
    width: 10%;
    min-width: 10%;
    max-width: 10%;
}

.time-col {
    width: 18%;
    min-width: 18%;
    max-width: 18%;
}

/* 表格容器樣式 */
#tableContainer {
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    max-height: 600px; /* 設定最大高度以啟用捲動 */
}

/* 靜態標題列圓角樣式 */
.row.border-top {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background-color: #DADADA;
}

/* 特定欄位水平置中 */
.table td:nth-child(2),
.table td:nth-child(3),
.table td:nth-child(4),
.table td:nth-child(5),
.table td:nth-child(6) {
    text-align: center !important;
}

/* 內容預覽樣式 */
.content-preview {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.more-link {
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 5px;
}

.more-link:hover {
    color: #0056b3;
}

/* 可複製內容樣式 */
.copyable-content {
    cursor: pointer;
    transition: background-color 0.2s;
}

.copyable-content:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
}

.copy-success {
    background-color: #d1edff !important;
    animation: copyFlash 0.5s ease-out;
}

@keyframes copyFlash {
    0% { background-color: #28a745; }
    100% { background-color: #d1edff; }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tag-complete {
    background-color: #22c25c;
    color: #000;
}

.notification-hover-btn {
    padding: 0.125rem 0.5rem;
    font-size: 0.8125rem;
}

.notification-detail-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
}

.notification-detail-tag {
    cursor: default;
}

.notification-tooltip {
    animation: fadeIn 0.2s ease-in-out;
}

.notification-tooltip-floating {
    position: fixed;
    z-index: 2000;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    width: max-content;
    max-width: min(720px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: none;
}

.notification-tooltip strong {
    color: #495057;
}

.notification-tooltip-row {
    margin-bottom: 0.25rem;
}

.notification-tooltip-row:last-child {
    margin-bottom: 0;
}

.notification-tooltip-value {
    white-space: pre-wrap;
    word-break: break-word;
}

/* 對象欄位樣式 */
.target-info {
    font-size: 0.875rem;
    color: #495057;
}

/* 選擇器寬度樣式 */
.form-select.w-auto {
    width: auto !important;
    min-width: fit-content;
    max-width: none;
}

/* 時間選擇器樣式 */
#scheduleHour,
#scheduleMinute,
#scheduleSecond {
    width: auto !important;
    min-width: 60px;
    max-width: 80px;
} 

@media (max-width: 768px) {
    .content {
        --mobile-table-min-width: 920px;
    }

    .content > .mb-2.d-flex {
        gap: 8px;
    }

    .content > .mb-2.d-flex > div {
        min-width: 0;
    }

    .content > .mb-2.d-flex > .d-flex {
        justify-content: stretch;
        width: 100%;
    }

    .content > .mb-2.d-flex > .d-flex .btn {
        width: 100%;
    }

    .content > .row.border-top .content-col,
    #tableContainer .content-col {
        flex-basis: 260px !important;
        width: 260px !important;
        min-width: 260px !important;
        max-width: none !important;
    }

    .content > .row.border-top .audience-col,
    #tableContainer .audience-col,
    .content > .row.border-top .details-col,
    #tableContainer .details-col,
    .content > .row.border-top .devices-col,
    #tableContainer .devices-col,
    .content > .row.border-top .language-col,
    #tableContainer .language-col,
    .content > .row.border-top .status-col,
    #tableContainer .status-col {
        flex-basis: 120px !important;
        width: 120px !important;
        min-width: 120px !important;
        max-width: none !important;
    }

    .content > .row.border-top .time-col,
    #tableContainer .time-col {
        flex-basis: 180px !important;
        width: 180px !important;
        min-width: 180px !important;
        max-width: none !important;
    }

    .content-preview {
        max-width: 240px;
    }
}
