/**
 * CSS สำหรับ Edit WP Content Shortcode
 * ธีมสี: น้ำเงิน, ส้ม, ดำ
 */

/* คอนเทนเนอร์หลัก */
.edit-wpcontent-container {
    position: relative;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.edit-wpcontent-container:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

/* เนื้อหาที่แสดง */
.edit-wpcontent-content {
    color: #212529;
    line-height: 1.6;
    padding: 10px 0;
}

/* ปุ่มแก้ไข */
.edit-wpcontent-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #1e88e5; /* สีน้ำเงิน */
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.edit-wpcontent-button:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: #1565c0; /* สีน้ำเงินเข้ม */
}

.edit-wpcontent-button i {
    font-size: 20px;
}

/* ฟอร์มแก้ไข */
.edit-wpcontent-form {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.edit-wpcontent-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    resize: vertical;
    font-size: 16px;
    color: #212529;
    transition: border-color 0.2s ease;
}

.edit-wpcontent-textarea:focus {
    outline: none;
    border-color: #1e88e5; /* สีน้ำเงิน */
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.2);
}

/* ปุ่มในฟอร์ม */
.edit-wpcontent-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.edit-wpcontent-save,
.edit-wpcontent-cancel {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-wpcontent-save {
    background-color: #1e88e5; /* สีน้ำเงิน */
    color: white;
}

.edit-wpcontent-save:hover {
    background-color: #1565c0; /* สีน้ำเงินเข้ม */
}

.edit-wpcontent-cancel {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
}

.edit-wpcontent-cancel:hover {
    background-color: #e9ecef;
}

/* การแจ้งเตือน */
.edit-wpcontent-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    font-weight: 500;
    color: white;
    animation: slideIn 0.3s ease-out;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.edit-wpcontent-notification.success {
    background-color: #ff9800; /* สีส้ม */
}

.edit-wpcontent-notification.error {
    background-color: #e53935; /* สีแดง */
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ปรับแต่งสำหรับอุปกรณ์มือถือ */
@media (max-width: 768px) {
    .edit-wpcontent-actions {
        flex-direction: column;
    }
    
    .edit-wpcontent-save,
    .edit-wpcontent-cancel {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .edit-wpcontent-notification {
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
        text-align: center;
    }
}

/* การเน้นเมื่อกำลังแก้ไข */
.edit-wpcontent-container.editing {
    border-color: #1e88e5; /* สีน้ำเงิน */
    background-color: #f5f9ff;
}