/**
 * CSS สำหรับระบบติดตามการแก้ไขปัญหา
 * ไฟล์นี้ควรถูกบันทึกใน childtheme/css/change-log-fw.css
 */

/* สไตล์สำหรับปุ่มอัพเดตการติดตาม */
.follow-btn {
    background-color: #ff6600;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    margin-top: 5px;
    box-shadow: 0 2px 5px rgba(255, 102, 0, 0.3);
}

.follow-btn:hover {
    background-color: #e05a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.4);
}

/* สไตล์สำหรับจำนวนการติดตามในตาราง */
.follow-count-wrapper {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
}

.follow-count {
    display: inline-flex;
    align-items: center;
    background-color: rgba(0, 102, 204, 0.1);
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(0, 102, 204, 0.2);
}

.follow-count:hover {
    background-color: rgba(0, 102, 204, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 102, 204, 0.2);
}

.follow-count-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #0066cc;
    margin-right: 8px;
    position: relative;
    flex-shrink: 0;
}

.follow-count-icon:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
}

.follow-count-text {
    font-size: 12px;
    font-weight: 600;
    color: #0066cc;
}

/* สไตล์สำหรับโมดัลอัพเดตการติดตาม */
.follow-update-content {
    max-width: 700px;
    border-top: 5px solid #ff6600;
}

.follow-update-content h2 {
    color: #0066cc;
    border-bottom: 2px solid #ff6600;
    padding-bottom: 15px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}

/* สไตล์สำหรับประวัติการติดตาม */
.follow-history-container {
    margin: 30px 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px dashed #ddd;
}

.follow-history-container h3 {
    color: #0066cc;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.follow-history-container h3:after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background-color: #ddd;
    margin-left: 15px;
}

.follow-history-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.follow-history-item {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #0066cc;
    transition: all 0.3s;
}

.follow-history-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.follow-history-item:last-child {
    margin-bottom: 0;
}

.follow-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.follow-num {
    font-weight: 700;
    color: #0066cc;
    font-size: 14px;
    display: inline-block;
    padding: 3px 10px;
    background-color: rgba(0, 102, 204, 0.1);
    border-radius: 20px;
}

.follow-date {
    color: #666;
    font-size: 13px;
}

.follow-detail {
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
}

/* สไตล์สำหรับฟอร์ม */
#follow-update-form .form-group {
    margin-bottom: 25px;
}

#follow-update-form label {
    color: #0066cc;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
    display: block;
}

#follow-update-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    transition: all 0.3s;
    background-color: #fff;
    resize: vertical;
    min-height: 120px;
}

#follow-update-form textarea:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
    outline: none;
}

#follow-update-form .submit-btn {
    background: linear-gradient(135deg, #0066cc 0%, #0055aa 100%);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    display: inline-block;
}

#follow-update-form .submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
}

#follow-update-form .submit-btn.submitting {
    background: linear-gradient(135deg, #888 0%, #666 100%);
    transform: scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* การแจ้งเตือนแบบ MUI */
.mui-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 0;
    min-width: 300px;
    max-width: 500px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    z-index: 9999;
    overflow: hidden;
}

.mui-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.mui-notification .notification-content {
    padding: 16px 20px;
    display: flex;
    align-items: center;
}

.mui-notification.success {
    border-left: 5px solid #4caf50;
}

.mui-notification.error {
    border-left: 5px solid #f44336;
}

.mui-notification.warning {
    border-left: 5px solid #ff9800;
}

.mui-notification.info {
    border-left: 5px solid #2196f3;
}

.mui-notification .notification-message {
    font-size: 15px;
    color: #333;
}

.mui-notification.success .notification-message::before {
    content: "✓ ";
    color: #4caf50;
    font-weight: bold;
}

.mui-notification.error .notification-message::before {
    content: "✗ ";
    color: #f44336;
    font-weight: bold;
}

.mui-notification.warning .notification-message::before {
    content: "⚠ ";
    color: #ff9800;
    font-weight: bold;
}

.mui-notification.info .notification-message::before {
    content: "ℹ ";
    color: #2196f3;
    font-weight: bold;
}

/* สไตล์สำหรับข้อความว่าง */
.no-data {
    text-align: center;
    padding: 30px;
    color: #888;
    font-style: italic;
    background-color: #f9f9f9;
    border-radius: 8px;
}

/* สไตล์สำหรับข้อความผิดพลาด */
.error-message {
    color: #f44336;
    text-align: center;
    padding: 15px;
    background-color: rgba(244, 67, 54, 0.1);
    border-radius: 6px;
    border-left: 4px solid #f44336;
}

/* Media Query สำหรับอุปกรณ์มือถือ */
@media screen and (max-width: 768px) {
    .follow-history-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .follow-num {
        margin-bottom: 8px;
    }
    
    .follow-update-content {
        margin: 10px;
        padding: 15px;
    }
    
    .mui-notification {
        min-width: auto;
        max-width: 90%;
        left: 50%;
        transform: translateX(-50%) translateY(100px);
    }
    
    .mui-notification.show {
        transform: translateX(-50%) translateY(0);
    }
    
    .follow-count {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .follow-count-icon {
        width: 14px;
        height: 14px;
        margin-right: 4px;
    }
    
    .follow-count-icon:before {
        width: 6px;
        height: 6px;
    }
}

/* สไตล์สำหรับจำนวนการติดตาม 0 ครั้ง */
.follow-count.follow-count-zero {
    background-color: rgba(169, 169, 169, 0.1);
    border: 1px solid rgba(169, 169, 169, 0.2);
}

.follow-count.follow-count-zero:hover {
    background-color: rgba(169, 169, 169, 0.2);
    box-shadow: 0 3px 10px rgba(169, 169, 169, 0.2);
}

.follow-count.follow-count-zero .follow-count-icon {
    background-color: #888888;
}

.follow-count.follow-count-zero .follow-count-text {
    color: #888888;
}