/* AI類型選擇器樣式 */
#ai_identity {
    line-height: auto;
}

/* 新增AI小編表單 - 單欄布局樣式 */
#add_editor .modal-dialog {
    max-width: 500px;
}

#add_editor .modal-body {
    padding: 1.5rem;
}

#add_editor .form-group {
    margin-bottom: 1.25rem;
}

#add_editor .form-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
}

#add_editor .form-control {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#add_editor .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

#add_editor textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

#add_editor select.form-control {
    height: auto;
    line-height: 1.5;
}

#add_editor input[type="file"] {
    padding: 0.5rem;
}

/* 提交按鈕區域 */
#add_editor .form_group_submit {
    margin-top: 1.5rem;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 1.5rem;
}

#add_editor .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: 8px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

#add_editor .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* 表單標題樣式 */
#add_editor .modal-title {
    font-weight: 600;
    color: #333;
}

/* 整體表單容器 */
#add_editor .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ===== 對話視窗樣式 ===== */

/* 對話視窗基本布局 */
.talk-body {
    max-width: 700px !important; /* 增加桌面版寬度 */
    width: 90%;
}

/* 對話視窗內容區域 */
.talk-body .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 對話視窗標題欄 */
.talk-body .modal-header {
    background: linear-gradient(135deg, #cd3f62 0%, #a23350 100%);
    color: white;
    padding: 1.5rem;
    border-bottom: none;
    position: relative;
}

.talk-body .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0;
    color: white !important;
}

/* 對話視窗主體 */
.talk-body .modal-body {
    padding: 2rem;
    background: #f8f9fa;
}

/* 表單組樣式 */
.talk-body .form-group {
    margin-bottom: 1.5rem;
}

.talk-body .form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    display: block;
    font-size: 1rem;
}

/* 輸入框樣式 */
.talk-body .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.talk-body .form-control:focus {
    border-color: #cd3f62;
    box-shadow: 0 0 0 3px rgba(205, 63, 98, 0.1);
    outline: none;
}

.talk-body textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.talk-body textarea[readonly] {
    min-height: 200px;
    background: #ffffff !important;
    border: 2px solid #28a745;
}

/* 按鈕區域 */
.talk-body .form_group_submit {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* 按鈕基本樣式 - 參考主頁面開始對話按鈕 */
.talk-body .btn {
    min-width: 140px;
    padding: 14px 28px;
    font-size: 15px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    margin: 0 0.5rem;
}

/* 主要按鈕樣式 - 使用主題色 */
.talk-body .btn-primary {
    background-color: #cd3f62 !important;
    border-color: #cd3f62 !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.talk-body .btn-primary:hover,
.talk-body .btn-primary:focus {
    background-color: #a23350 !important;
    border-color: #a23350 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(205, 63, 98, 0.3) !important;
}

/* 次要按鈕樣式 */
.talk-body .btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

.talk-body .btn-secondary:hover,
.talk-body .btn-secondary:focus {
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3) !important;
}

/* 按鈕的閃光效果 - 參考主頁面樣式 */
.talk-body .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.talk-body .btn:hover::before {
    left: 100%;
}

/* 步驟2的網站選擇區域 */
.talk-body .site-check {
    margin-bottom: 0.75rem;
}

.talk-body .site-check-input:checked + .site-check-label {
    background-color: #cd3f62 !important;
    color: white !important;
    border-color: #cd3f62 !important;
    box-shadow: 0 2px 8px rgba(205, 63, 98, 0.3);
}

.talk-body .site-check-label {
    display: block;
    padding: 0.75rem 1rem;
    margin: 0;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.talk-body .site-check-label:hover {
    border-color: #cd3f62;
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(205, 63, 98, 0.1);
}

.talk-body .if_no_show {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
}

.talk-body .if_no_show a {
    color: #cd3f62;
    text-decoration: none;
    font-weight: 500;
}

.talk-body .if_no_show a:hover {
    color: #a23350;
    text-decoration: underline;
}

/* 通知訊息樣式優化 */
.copy-notification,
.copy-notification-empty,
.copy-notification-sent,
.copy-notification-no-login,
.copy-notification-empty-web {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    color: #CD3F62 !important;
    background-color: white !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
    font-weight: 500 !important;
    border: 1px solid #e9ecef !important;
    max-width: 90vw !important;
    text-align: center !important;
}

.copy-notification a,
.copy-notification-no-login a {
    color: #cd3f62 !important;
    text-decoration: none;
}

.copy-notification a:hover,
.copy-notification-no-login a:hover {
    color: #a23350 !important;
    text-decoration: underline;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .talk-body {
        max-width: 95% !important;
        margin: 1rem auto !important;
    }
    
    .talk-body .modal-header {
        padding: 1rem;
    }
    
    .talk-body .modal-body {
        padding: 1.5rem;
    }
    
    .talk-body .modal-title {
        font-size: 1.1rem;
    }
    
    .talk-body .btn {
        min-width: 100px;
        margin: 0.25rem;
        padding: 0.6rem 1rem;
    }
    
    .talk-body .form_group_submit .btn {
        width: 48%;
        margin: 0.25rem 1%;
    }
}

@media (max-width: 480px) {
    .talk-body {
        max-width: 98% !important;
        margin: 0.5rem auto !important;
    }
    
    .talk-body .modal-body {
        padding: 1rem;
    }
    
    .talk-body .form_group_submit .btn {
        width: 48%;
        margin: 0.25rem 1%;
        padding: 0.5rem 0.75rem;
        font-size: 14px;
        min-width: auto;
    }
}
